Jump to content
Sign in to follow this  
BeerHunter

Can you attach a script to an object?

Recommended Posts

I'm wondering if you can attach a script to an object so that when that object is used , the script fire.

Thinking primarily of the radio and a script that would offer a number of options if the radio is used , rather than having to use a trigger to accomplish this.

Share this post


Link to post
Share on other sites

Sounds like you need an object's action (and not the object itself) to be linked to a script.

If the object's status changes when used (e.g., a variable containing a count, a variable changing from a zero to one, etc.) then you could use a script that would monitor a variable to assess availability of the action requested.

If I understood your goal correctly you may want to look into Draper's Air Support Script where you can use the radio and a script to call for support and you can choose how many times a particular option could be available (i.e., call for chopper attack support only 3 times in the game).

I hope this helps. :D

Best, Splicer.

Share this post


Link to post
Share on other sites
why re-invent the wheel?? :D

My motto too! :D

Glad to be of help!

Best, Splicer.

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  

×