Jump to content
Sign in to follow this  
TemichSablin

Scripting questions

Recommended Posts

1)is there any way to attach an acton to a specific player (scripting only) and let him and only him use this action? > i get that any1 can use this action (who's in proximity to him and his body)

AddAction command simply doesn't set a radius :-(

2)Any way to make that action removed if the player dies?

btw i saw some way to solve it in config.cpp but i need this in editor, not add-on

Edited by TemichSablin

Share this post


Link to post
Share on other sites

Instead of adding the action in the init box, write this instead:

[this] exec "action.sqs"

action.sqs:

_unit=_this select 0

action1=_unit addAction <your line here>

@!alive _unit
_unit removeAction action1
exit

Tell me if it didn't work. The logic of using a privately run script is that the commands written in the init box are executed by everyone.

Edited by Celery

Share this post


Link to post
Share on other sites

celery you are helpful as always, thanks!

but the first problem still exists.

Anyone in MP (and that's done in MP) can just walk up to guy and use his menu

Need smth like this:

OnlyForPlayer=1;

or:

Radius=0.010000;

EDIT:

and its not a way for me to make a script check if the user is the one who should call the menu

needed objective is to make an action visible only to the guy who it belongs to

Edited by TemichSablin

Share this post


Link to post
Share on other sites

Now that I remember, I had the same problem with one of my own missions.

Modify it like this:

?local _unit:action1=_unit addAction <your line here>

Share this post


Link to post
Share on other sites

YEAHHHH IT WORKS!!!!!!

Celery if I was able to do it, I'd hug you!

Thank you very much!

Edited by TemichSablin

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
Sign in to follow this  

×