Jump to content
prototype1479

Addaction command on global (with publicvariable command)

Recommended Posts

Can you make Addaction command go public with publicVariable when its local? (I don't have a server to test this)

 

For example:

 

Action1 = Player Addaction ["Destroy","Destroy.sqs"]

 

publicVariable "Action1"

Share this post


Link to post
Share on other sites

Hey one of many names :)

 

PublicVariable does not make a variable public, but transmits a variable to all clients connected.

 

This is used most often with completed objectives and mission ends.

Variables like this are True or False.

 

Example:

Make OBJ1Done false in Init.sqs

OBJ1Done=false

 

Then in trigger for OBJ1 being complete put in trigger init line:

OBJ1Done=True; publicVariable "OBJ1Done"

 

This sets the OBJ1Done variable to true and sends the publicVariable to all clients.

Now if you want some action to take place when OBJ1Done is true you would put that (OBJ1Done) in the condition line of a trigger or a waypoint.

 

I hope this makes sense.

 

BTW the use of "Player" in MP can be problematic as each player is Player in their machines.

  • Like 1

Share this post


Link to post
Share on other sites

So it won't make Addactions public when it becomes private in some situations?  

 

Anyways you still here to help me man thanks!

 

Oh and yeah I do use _p = _this select 1 (on AddAction's) and _p = _this select 0 (On others. Depends on command/script) because I trust them more than "player" command but that was just an example.

Share this post


Link to post
Share on other sites
19 hours ago, prototype1479 said:

zulu1 = best player?

 

Thanks :D

 

Not really, two players who can rack up an insane amount of kills:

poweruser

[vs] exec (aka Nevada Smith)

  • Like 1

Share this post


Link to post
Share on other sites

#reconfirm

? poweruser == op : fight1 = true

? nevada_smith == op : fight2 = true

 

#1v1

? Fight1 == false : goto "reconfirm"

? Fight2 == false : goto "reconfirm"

poweruser setPos [(getPos WarStadium select 0)+0, (getPos WarStadium select 1)+2, (getPos WarStadium select 2)+0]

Nevada_smith setPos [(getPos WarStadium select 0)+0, (getPos WarStadium select 1)-2, (getPos WarStadium select 2)+0]

exit

 

Let the battle begin :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×