OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Tim Pink on 17 Jun 2003, 04:26:41
-
hi im trying to create a unit at a game logic location
ive set the game logic and put this in the inti field
:group2 = group this; deletevehicle this
i gave it 5 waypoints and i wrote a small script and this is waht it says
:"SoldierWG" CreateUnit [getPos gl,group2,"jeff=this",0.7,"Seargeant"]
now when the script is executed the man appears, Disapears and then reappears at the next waypoint and does this for the whole 5
where am i going wrong, all i want is to make the man appear and move to the next waypoint on foot, not by chucking a david copperfield!!!
thanx
p.s Watch your back LCD, would'nt want an AT missile through the bedroom window would we
;) ;) ;)
-
oh and does it matter if the waypoints for the game logic say "and" or "or"(weird sentence)
thanx
-
I am not sure how or when you are executing the script, but ..
Do not game logics move from waypoint to waypoint instantly? Maybe someone else can confirm that.
Gamelogics have there own side and might have something to do with your warping problem (see above). There are some SERIOUS problems that can arise when joining units and logics into the same group and/or side.
See official thread: http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=fc34f9ed10c2c7fde56c53588842a727;act=ST;f=7;t=29429;hl=side+and+logic (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=fc34f9ed10c2c7fde56c53588842a727;act=ST;f=7;t=29429;hl=side+and+logic)
You should spawn your soldier to an existing group on a particular side for best results. Try using a soldier instead of a game logic. Although, I commend you on your thought process. If it wasn't for the side issue, I would say you have a good idea going.
-
thanks
i wonder if i had a unit and put in his init field : group2=group this; deleteunit this
would it keep an empty group that the units can be created into
i would really appreciate any feed back because i know what to do but i need help putting it into practice
please Sui........where r u
my messiah has abandoned me
:'(
thanx
-
Here's how you can test it:
add: hint format["%1",group2];
after the deletevehicle
if it says "scalar bool blah blah blah" then it is grpNull
if it says something like "WEST Alpha Black" then everything is ok!
I would test it, but I am off to work :P
-
would it keep an empty group that the units can be created into
positive
Do not game logics move from waypoint to waypoint instantly? Maybe someone else can confirm that.
positive
@ timothy
not wroing - ive got armored windows + walls in ma house (u can never know w/ em DAE troops round here :P)
nywayz jere somin
LCD =(http://216.180.247.115/fight/itschy.gif) = pinky
:P
LCD OUT
-
Do not game logics move from waypoint to waypoint instantly? Maybe someone else can confirm that.
Indeed they do...
I've never tried createunit using a game logic group, but you might have more luck using the other method you suggested (create a soldier then deletevehicle 'em ;))...
I know for a fact that that works...