Jump to content
Sign in to follow this  
toadlife

Scripting command request

Recommended Posts

I definitely agree with the typeOf variable request...

Um, as to further requests... ( biggrin.gif maybe I should change that to wishes)

- dynamically createable markers...

- strings convertable to arrays of characters, or at least more manipulation of strings possible (subtract...)

- unitClass unit : returns a string containing the units class name...

- magazine setAmmo amount : useful for those times when you need to attach a silencer to your weapon smile.gif ...

- implement pointers for arrays. e.g. normal array works as usual, but have a "pointer" function where: pointer array returns a pointer to the array instead of the array itself...

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Liquid_Silence @ Jan. 08 2003,09:39)</td></tr><tr><td id="QUOTE">- unitClass unit : returns a string containing the units class name...<span id='postcolor'>

If you are going to have a unit class then let's get the whole branch of the unit in an array, how about just rewriting the typeOf function to return the array with element 0 being the actual vehicle type.

["TOYOTA","CAR","LAND","VEHICLE"]

(not precise but example)

Share this post


Link to post
Share on other sites

Also what would be a nice addition would be an "attach" command, which would attach a vehicle to another vehicle using certain offset position, for example "chopper attach [jeep,0,0,-0.3]" would attach unit "jeep" into "chopper", 0.3 meters below its center point, and keep it there until deattached with another command... I dont know how hard this would be, really what would be needed is move the attached unit with the other unit, according to its position, rotation, pitch, roll, etc. and disable collision detection between these two units to avoid problems....

Share this post


Link to post
Share on other sites

I'd love to see the ability to write a variable/string/whatever to a file. (i.e. a working debugLog command.)

Axek.

Share this post


Link to post
Share on other sites

I would like to be able to specify the interval in which a trigger set to "repeadly" will check for a condition to be true. This would be so that you can create triggers that go off repeatedly without the target unit having to move in and out of the trigger area to activate it. In other words, something like the </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">while<span id='postcolor'> command used in scripts, except for triggers.

Share this post


Link to post
Share on other sites

how about a way to tell your entire squad to rearm at the same time?

instead of telling each unit to grab 1 mag at a time, you could tell them all to rearm and they would max out the mags for whatever weapon they are carrying provided that the mags are in the ammo box.

that would save precious time during a heated battle when your guys run out of ammo.

Share this post


Link to post
Share on other sites

I like all of these, ESPECIALLY K's attach command. Along with that how about the functionality of permanently attaching units to each other (gunships, etc.).

Ben

Share this post


Link to post
Share on other sites

I'd like the ability to script specialized WP's like guard and S&D. Currently the only way I have found to do this is creating yer own script, run a loop and then hope yer guy will eventually find someone.

Hoz

Share this post


Link to post
Share on other sites

What about a command to check wether an unit is ai or controlled by a player, without having to delete it? Something like isAI (T/F). Would be usefull if you have to script some actions that the ai couldn't handle otherwise, but want to avoid conflicts if a player is in control...

I also like that idea with the Attach function - would help adding additional weapons to vehicles and make other things (like chopper transport scripts for multiplayer) much less problematic.

Share this post


Link to post
Share on other sites

I would like to see a command you can specify to return all Units of a certain side. Ex:

Wlist = []

Elist = []

Rlist = []

Wlist = allUnits west; Elist = allUnits east; Rlist = allUnits resistance

Share this post


Link to post
Share on other sites

You can do that with the thislist command in a trigger, though the way you suggested would be good.

RED

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (joltan @ Mar. 06 2003,15:39)</td></tr><tr><td id="QUOTE">What about a command to check wether an unit is ai or controlled by a player, without having to delete it? Something like isAI (T/F). Would be usefull if you have to script some actions that the ai couldn't handle otherwise, but want to avoid conflicts if a player is in control...<span id='postcolor'>

This can allready be done very easily.

eg.

?soldier1 == player <---tells you if the soliers if AI or not.

OR...

in mp

?(local soldier1) and !(soldier1 == player) <--tells the server if soldier1 is AI or not.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Bullz_eye_on_my_back @ Feb. 15 2003,22:18)</td></tr><tr><td id="QUOTE">I would like to see...

getTurretDir

SetTurretDir

getTurretAngle (well gun angle on the turret)

SetTurretAngle<span id='postcolor'>

I agree with this excpet it should not be specific to turrets. it should return the direction a player is looking - Not which way his body is facing.

A command like this coulkd tell you exactly where any unit is looking/aiming, including a tank gunner.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (hoz @ Mar. 06 2003,21:58)</td></tr><tr><td id="QUOTE">I'd like the ability to script specialized WP's like guard and S&D. Currently the only way I have found to do this is creating yer own script, run a loop and then hope yer guy will eventually find someone.<span id='postcolor'>

I absolutely agree with this one. I mean, you can do about 10x the amount of scripting commands with Markers than you can with WPs for God's sake!

The ability to dynamically (sp?) monkey around with WPs in scripts would make my life a whole lot easier..

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (MintyBoy @ Mar. 17 2003,04:45)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (hoz @ Mar. 06 2003,21:58)</td></tr><tr><td id="QUOTE">I'd like the ability to script specialized WP's like guard and S&D. Currently the only way I have found to do this is creating yer own script, run a loop and then hope yer guy will eventually find someone.<span id='postcolor'>

I absolutely agree with this one. I mean, you can do about 10x the amount of scripting commands with Markers than you can with WPs for God's sake!

The ability to dynamically (sp?) monkey around with WPs in scripts would make my life a whole lot easier..<span id='postcolor'>

I second that.

All those in favor?

EYYYYYYYYY!

All those in opposed?

....

Motion passed.

Share this post


Link to post
Share on other sites

OK one more thing...until I think of another thing.

I would like the disableradio command, to have the option of working for only certain units...This would make it so custom radio messages can play, and your squadmembers cant talk over them,

Like this perhaps

[soldier1,soldier2,soldier3] disableradio true

and to go along with it, a command to tell if a soldier's radio is disabled.

radioenabled soldier1 (returns true/false)

Share this post


Link to post
Share on other sites

So, since 1.91 was the last patch for this version. Can we still request script commands for the next release or is this thread now void?

Share this post


Link to post
Share on other sites

There is a thread in the general section of the forum...

it should be up at the top called "what would you like to see in ofp2" biggrin.gif

Lets get some good ideas in there for them!!

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Pennywise @ Mar. 24 2003,00:13)</td></tr><tr><td id="QUOTE">So, since 1.91 was the last patch for this version.  Can we still request script commands for the next release or is this thread now void?<span id='postcolor'>

Yep, unfortunately this thread does seem to be void. Bit of a bugger, because there were some really useful ideas. confused.gif

Share this post


Link to post
Share on other sites

_ArrayPlayers = Players

_ArrayPlayers --> ["Server","uiox","dude"]

_ArrayPlayers select 0 is always the server. This array is update when a player join or quit.

[] exec ["OneScript.sqs",Players]

[] exec ["OneScript.sqs",[_ArrayPlayers select 0]]

Script start only server side.

Or execOnserver "EndGame.sqs"

CloseSlot [west,true]

_WestPlayers = west Slots

Events:

Onassign

Onbriefing

endgame or exit

GetIn Getout for AIs or InVehicle,Outvehicle

Fired select 5 return ammos velocity

Position up,crouch,prone

Reveal

Locked

respawn

Share this post


Link to post
Share on other sites

Should this be in the OFP2 section now?

RED

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  

×