Jump to content
  • entries
    251
  • comments
    818
  • views
    192772

Ha Ha!


DocClox

1474 views

So, I'm trying to make it so when I drop an item, it floats in the air.

 

I've got these glowy, floaty things, you see. Better have a screenshot of that...

 

9ITuzdR.png

 

Yeah, all right. Any excuse, I know...

 

Anyway, I've got the "glow" part sorted out, but the floating only works there because I placed them there in the editor and turned off havoc settle. Pick 'em up and drop 'em and the roll around on the floor, which isn't what I want.

 

So I added a script to the gems so that if they were dropped they'd translate upwards. And it didn't work. I tried everything I could think of, but the only thing I got was a gem rolling the dust and Welynn shouting at me for dropping my rubbish in his nice clean cell.

 

So I thought "maybe it needs a static, or a movable static".

 

With this in mind I added a table to the test cell. I created a movable static, pointed it at a glowy gem mesh, and stuck it on the table, next to a button. I added this script to the buttton:

Scriptname dpv_test_lev_button extends ObjectReferenceObjectReference Property Gem  Autoevent OnActivate(objectreference foo)        float x = GetPositionX()        float y = GetPositionY()        float z = GetPositionZ()        translateTo(x, y, z + 1000, 180, 0, 0, 100)endevent


Then I coc'd into my test cell to test it. Well you can guess what happened...

 

2ny0EEP.png

 


uZ5vSSF.png

 

2lFK1No.png

 

I made the script levivate the button rather than the gem! Laugh? I nearly started.

 

Well, at least I know the code works now...

9 Comments


Recommended Comments

Content Consumer

Posted

"I sense... a spirit in this house... Spirit! If you're there, speak to us! Give us a sign!"

 

"Oh, my Gods, it's levitating the... the button! It's moving the button upwards!"

DocClox

Posted

Yeah. It was a bit like that.

 

One of those genuine "what the FUCK?" moments :)

Otaku21

Posted

been reading a few of thise Logs here.... not sure whats going on. Just what are you working on Doc?

DocClox

Posted

It's a new mod called "Pretty, Vacant".

 

There's a new guest staying at the Drunken Huntsman; an old boy named Welynn who travels with three lovely women who see to his every need, if you see what I mean.

 

Only Welynn isn't happy about it and wants to find someone else to look after his girls. Apparently there's a contract involved...

vipermagi

Posted

If I am not completely mistaken, there is an object havok flag that when set, tells Havok to ignore the world mesh, and one of the consequences of it is that the object remains where "placed." I.e. if you drop it out of your inventory, where it spawns at it remains, or if you place it in the creation kit, it stays there. Although, one of the other consequences is that you the player can't interact with it either, can't pick it up, can't move it, can't add it to your inventory.

 

I also have no idea how to set that flag either... sorry.

DocClox

Posted

It's OK, I got it.

 

The trick is to call setMotionType(4) on the ref before translating it. That makes sure that the item's movement is keyframed and not driven by Havoc.

 

Took most of yesterday to find out that little gem. Oh well, it's all learning, I suppose.

Otaku21

Posted

It's a new mod called "Pretty, Vacant".

 

There's a new guest staying at the Drunken Huntsman; an old boy named Welynn who travels with three lovely women who see to his every need, if you see what I mean.

 

Only Welynn isn't happy about it and wants to find someone else to look after his girls. Apparently there's a contract involved...

 sounds pritty good so far, This mod is it for Males or females? if both dose they have diffent roots to take?

DocClox

Posted

Should be playable by either, without much difference at all, really, apart from a few leers and wisecracks from Welynn.

 

Maybe a couple of compromising situations for female players ... but that's not a priority.

Otaku21

Posted

sounds very interesting, I wish you luck on this mod then, cant wait to try it out once it is

×
×
  • Create New...