To keep resources low i created a unit which randomly respawns alive every 5 seconds even if it has been shot before.
The init line of the unit contains some values [this, "seek", 40] exec "RandomMove.sqs".
"seek" is the name of the marker to position it and 40 is the radius of the respawn area.
The script works fine so far. The unit however is in the game right from the start.
Now i was planning to let the unit appear after a trigger has been activated and then let it execute the script
After reading several threads i have learned that people having problems to combine creatunit with executing scripts.
The following commandline almost works:
"SoldierWB" createUnit [getMarkerPos "seek", alphagroup, (this "seek", 40); this Exec "RandomMove.sqs", 0.7, "CAPTAIN"]
When executing the script i get an error due to the bold part of the line.
Now my question. How can i get the information [this, "seek", 40] assigned to the unit when creating it so the script can read the values process and them?
I was thinking of giving the unit a name and let the script execute afterwards: Name = "SoldierWB" CreateUnit [.....
This however will take too many triggers. I want to keep it as simple as possible.
Is there any way i can get the values [this, "seek", 40] in the createunit command itself?
This way i would only have one command and one trigger for the unit.
Thx
Malle