Jump to content

Malle2000

Member
  • Content Count

    2
  • Joined

  • Last visited

    Never
  • Medals

Everything posted by Malle2000

  1. 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
  2. Well that would have been too easy. Thx for the try anyway. I guess OFP does mix up the brackets. I got a solution in ofpediting.com forumr which works fine: "SoldierWB" createUnit [getMarkerPos "seek", alphagroup, "enemyR1 = this", 0.7, "CAPTAIN"]; enemyR1 setBehaviour "careless"; enemyR1 = [this, "seek", 40]; enemyR1 Exec "RandomMove.sqs"; it still didnt answer my question of how to get in values right into the createunit command but it does the job and i still have one command line. THX Malle
×