Jump to content
Sign in to follow this  
MetalGearXM

Wierd scripting questions

Recommended Posts

Hey. I've been playing around with OFP scripting off and on for a long while, but now with the release of Armed Assault, I want to remake some dead projects. Unfortunately, not only have I re-run into old problems, but there are some new, interesting whats I was hoping someone would know how to clear up.

Now, playing god can be fun, with the killing and ressurecting and stuff, but with the release of Armed Assault, I notice the simple command "setdammage 0" doesn't work on units that have died anymore. Is this done purpousfully or something? Perhaps there is a command or way to revive the unit without going through a respawn? On that note, something else a little distraughting is about. Whenever a script is being run on a unit using variables, and the unit dies and respawns, the script is no longer valid to the unit. i.e. it has to be reinitialized to get the proper variable. I haven't been able to figure out what to do to keep a script running!

On another topic, I noticed you can change a units side by editing the mission.sqm file, but is there a way to change a unit's actual side in game or via command? If you change the unit side in the mission.sqm, and then you change something in the editor, you're left with the units going back to their original sides!

Using format in a command such as "globalchat ["blahdebla %1", _var] produces very satisfying results, but what if you want to use a variable in an array, such as TitleText ["bladebla*insert variable here", "PLAIN", 3]? There are alternatives to this, but it would be nice to know how this can be done.

Lastly, is there a way to spawn custom sprites? Like with the drop command, you can spawn one of three different kinds of sprites, but what if you want to spawn a number that's just floating there instead of an ambient smoke-effect? How/Can this be done?

These questions have been killing me forever, and perhapse some wise people would know the answers?

Share this post


Link to post
Share on other sites

Since arma isn't "for" me, I might be wrong, so here's nothing:

I think setdammage 0 should actually be setdammage 1.

If I'm wrong, sorry. sad_o.gif

yay.gif AgentJonathan yay.gif

Share this post


Link to post
Share on other sites

If i'm not wrong, try this:

_text = format ["%1",_yourRealText]

titleText [_text,"PLAIN",_time]

Where _time can be inexistent (, if not existing time declared, just quit the last ",".

Something like this:

titleText [_text,"PLAIN"]

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  

×