Home   Help Login Register  

Author Topic: Random starting position..?  (Read 830 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Random starting position..?
« on: 06 May 2005, 17:54:42 »
I need to make a random starting positions to group. How?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Random starting position..?
« Reply #1 on: 06 May 2005, 18:28:16 »
Place some empty markers on the map.  Group them to the group leader.    He will appear randomly at one of the markers or his original position.    His group will appear around him assuming they are "In Formation".

It doesn't really matter, but I'd say this was a "General" question rather than an "Advanced" one.    
Plenty of reviewed ArmA missions for you to play

Serial Killer

  • Guest
Re:Random starting position..?
« Reply #2 on: 06 May 2005, 18:39:36 »
Another question.. How can I delete the dead bodyes, when someone is dead?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Random starting position..?
« Reply #3 on: 06 May 2005, 18:44:57 »
Scripts in the Ed Depot.
Plenty of reviewed ArmA missions for you to play

Serial Killer

  • Guest
Re:Random starting position..?
« Reply #4 on: 06 May 2005, 19:16:27 »
That's all I need today :)

Serial Killer

  • Guest
Re:Random starting position..?
« Reply #5 on: 06 May 2005, 19:35:39 »
Just one more thing.. How can I activate a script for everyone in certain trigger area? I remember that it was something ...forEach thisList.
Here's what I want to  be acitvated for everyone: this addeventhandler ["killed", {_this exec "erase.sqs"}]

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Random starting position..?
« Reply #6 on: 06 May 2005, 19:57:27 »
put this in a trigger:

Code: [Select]
"_x addeventhandler [{killed},{_this exec {Dead.sqs}}]" forEach thislist
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Random starting position..?
« Reply #7 on: 07 May 2005, 10:20:47 »
there is a more efficient way of deleting bodies than having every unit run a timed delete script or utilising a fast looping trigger


This is how it would work
 The deadbody array is filled via an eventhandler killed on each ai unit
 The system uses one array to fill another, then waits a period before it deletes the bodies from the newly created array
 It then removes the elements in the new array from the old array and restarts the loop
 This way a dead body waits at least 120 seconds (+ 60 random seconds) after death before it is removed
 It uses
this addEventHandler ["killed", {tx_deadbody = tx_deadbody + [_this select 0]}]
;; in the init field of each unit

This removes the problem of having multiple remove dead body scripts running
(Very efficient when you have a hundred or so AI to kill)  but allows the dead units to remain on the map for at least X seconds.

Here's the system

Mission editor
Init Field of each unit
this addEventHandler ["killed", {tx_deadbody = tx_deadbody + [_this select 0]}]

Init.sqs
?(local server): [] exec "deadbody.sqs"


deadbody.sqs
Quote
#INIT
tx_removebody = []
tx_deadbody = []

#START
tx_removebody = tx_deadbody
;; the following delay is the minimal amount of time you want a body to remain on the map
;; in the case below its between 2 and 3 minutes
~ 120 + (random 60)

{deletevehicle _x} forEach tx_removebody
tx_deadbody = (tx_deadbody - tx_removebody)
goto "START"


and heres a link to a random spawnpoint thread
http://www.ofpec.com/yabbse/index.php?board=7;action=display;threadid=23209



one day i will get around to publishing all my scripts for the editors depot
« Last Edit: 12 Aug 2005, 21:32:49 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123