PDA

View Full Version : Scripting Help



Superman
August 2nd, 2007, 06:19 PM
i am a little confused on how to make the (portable) grav lift effect...



(script dormant Grav_Lift_Effect
(if (= ( wenever grav lift [equipment tag] is dropped)) true)
;would there be a damage modifier here that does the lifting?
)
)

Flood55
August 2nd, 2007, 06:50 PM
Well first you have to use the functions available in the game engine, not ones made up like "whenever grav lift is dropped". I suggest going into sapien and find valid functions in there to help you (you can just type help before the function to give its meaning and syntax).

Superman
August 2nd, 2007, 07:05 PM
well, by whenever grav lift is dropped" i wanted to know the function for dropping an object or equipment, i looked in the scripting bible and i couldnt find anything. I know its not a real function, it was just there as a reference.

Tarzan
August 2nd, 2007, 07:17 PM
you'd probably want to do that with the (unit_has_weapon) argument, because if I'm not mistaken, the grav lift was implemented as a third weapon? Anyway, you'd want to test for the unit_has_weapon, then unit_has_weapon_readied, and then the unit_has_weapon again. However, it may be that the grav lift deploys itself as a firing effect. In that case, you wouldn't need a script.

The actual lifting would prolly be done with some markers on the model itself and a damage effect that doesn't really damage anything, just lifts MC up. Basically, the way you would go about scripting this depends entirely on what sort of item your lift is, be it weapon, nade, or something else.