OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Evan Scown on 11 Jun 2006, 01:42:52
-
A question, how do I get someone to sit on a chair or get something on a table or something like that?
-
chair named my_chair.
unit named my_unit.
trigger covering unit, grouped to unit, on activation
my_unit setpos getpos my_chair; my_unit switchmove "onchair"
use 'chair x'. none of the others seem to work quite as well.
to put something on a table:
table named my_table.
object named my_object.
in the object's init field type
this setpos [getpos my_table select 0, getpos my_table select 1, 1]
you might have to play with that last value of 1, as tables are about 0.8 metres tall.
one last point:
...or get something on a table or something like that?
please try to ask specific questions, it helps us to help you more effectively.
-
Ok so the my_unit setpos getpos my_chair; my_unit switchmove "onchair" script goes in the initialization of the my_unit? cause so far he stands on the chair not sits on the chair
-
Ok so the my_unit setpos getpos my_chair; my_unit switchmove "onchair" script goes in the initialization of the my_unit?
IIRC the switchmove command doesn't work when put in an init of a unit. This is why bedges suggests putting those lines in a trigger. ;)
-
Ah K...next question...hehe how do I make the trigger?
-
at the top of the editor there will be a 'triggers' button. click it.
now doubleclick on the map. a dialog box will appear with options for the trigger. leave everything as it is, but in the box where it says "On Activation", type this code
my_unit setpos getpos my_chair; my_unit switchmove "onchair"
click ok.
at the top of the editor there will be a 'groups' button. click it.
now move your mouse over the trigger flag and click and hold. move the mouse over to my_unit and release the mouse button. a blue line should now connect the trigger to my_unit, meaning the two are grouped.
make sure my_unit is inside the trigger's circle and preview the mission.
-
If I want a unit, sitting on a chair to wave at a chopper as it takes off, or salute the chopper as it takes off (preferably the first), using a trigger (with thanks to OFPEC, I now know how to use), what would the activation be. I figure it would need to be something like if chopper_name engineon then unit_name SwitchMove effect
But there is a reason why you guys are the experts
-
try it and see. if you have a general idea on how to do it try it then if it doesn't work then ask.
-
Got an Error
-
...errr, we're going to need a bit more info than that.
What code did you use, where was the error message, and what did the error message say?
-Pilot
-
OK what I have at the moment is a trigger that gets a unit to sit on a chair. What I'm wanting to happen next, while he's sitting on this chair, is for when a specific chopper engines up, for the unit sitting down to standup and salute him, then sit back down. The sitting down part I know, it's just getting the standing up at the time the engine turn on.
-
is this within a mission, or is it for a cutscene? if you are trying to create a complex series of animations at specific points, you'd be better off scripting it.
-
It's in the middle of game, its at the beginning and it's as the chopper takes off with the infantry guys. Hence the Trigger.
Edit The Person on the chair stands up to wave (or salute...preferably wave) then sits back down.
-
what you want is this. In my opinion one of the most useful tools ever created for flashpoint mission makers and often overlooked.
[attachment deleted by admin]
-
Also I recall Macguba and sombody (sorry, bad memory :P) made a great animations mission back in the day. Check the mission depot when it comes back up Evan, if the AK moves mission didn't help (which I doubt, I agree with The-Architect, that is definatly a very useful tool.