Jump to content

Photo

Random Event Generator


6 replies to this topic

#1
D.Christ

D.Christ

    Civilian

  • Registered Users
  • 79 posts

So I am placing 

 

_rand = [player execVM "testing.sqf", player execVM "testing.sqf", player execVM "testing.sqf"];
selectRandom _rand; 

 

into an trigger in order to execute a testing.sqf file that tells the player that the script works. Eventually, I would like to script to remove either the weapons, the vest, or the backpack from a player but the function itself does not seem to work. I have experience with the other commands but the selectRandom command is new to me. Any help?



#2
CPT M.Flas

CPT M.Flas

    Captain

  • Captain
  • 1,592 posts
  • LocationMissouri

Donator

"Hey, sorry for going AWOL, good to see you all again, how you guys doing?"

oh me too thanks

 

On a more serious note, I've no experience with that particular function (selectRandom), but just making sure you realize you're using all the same script, so it will always return whatever is in testing.sqf. I'm sure the Bohemia documentation will have better documentation than me.


  • CW2 B.Osborn, 1LT J.Hedd, SSG S.Kasper and 1 other like this

mflas_sig.png


#3
D.Christ

D.Christ

    Civilian

  • Registered Users
  • 79 posts

I said sorry to one of the LT's when it happened and asked that he send it around due to how busy I was. I guessed it never got around. The testing.sqf that is read in all of them is just to make sure the script works. It is supposed to display a message to the player on activation telling the player that it works but so far it has not. Was wondering if anyone had another solution to the problem that could still generate a random event.



#4
CW2 B.Osborn

CW2 B.Osborn

    Chief Warrant Officer 2

  • Chief Warrant Officer 2
  • 1,565 posts
  • LocationChula Vista, California

Donator

If he rejoins does that mean its the second coming of Christ?


CW2.png
Chief Warrant Officer 2 Benjamin Osborn
12th CAB Pilot
Ranger Qualified


#5
D.Christ

D.Christ

    Civilian

  • Registered Users
  • 79 posts

More like the 4th or 5th but I can't, I work Saturdays till midnight



#6
Alpine_gremlin (Tojo)

Alpine_gremlin (Tojo)

    Friend of the 173rd

  • Friend of the 173rd
  • 2 posts

I don`t really understand your method of calling the script file. That selectRandom command is used to pull a random element out of array.

 

If you want to call your actual script via trigger then just type

execVM "testing.sqf";

into the on Activation box of the trigger. Ensure that trigger activation conditions are also how you want them.



#7
SPC S.Donohue

SPC S.Donohue

    Specialist

  • Specialist
  • 104 posts

"The second coming of christ" I think this time it's the third of fifth probably the ninth coming of this dude.


PFC.png
Private First Class S. Donohue

1-4 Combat Medic
Ranger Qualified

"Forever PFC"




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users