Home   Help Search Login Register  

Author Topic: Command Requests - please ?  (Read 953 times)

0 Members and 1 Guest are viewing this topic.

Offline Roni

  • Members
  • *
  • Play the Game !
Command Requests - please ?
« on: 19 Aug 2004, 03:41:42 »
Hello All

I wasn't sure where to out this put I saw the sticky post on function requests and this IS a form of scripting ideas, so . . .   :P


I have been scripting for a while now and I've noticed that there quite a few things that we scripters would LOVE to be able to do but can't.  There are usually workarounds to most problems but most are either too complex or have certain in-game limitations to make them univarsally applicable.

Now, since BIS has provided us with new commands in the past (eg onMapSingleClick etc) it seems that the only thing stopping them from making up new commands all the time is the time and effort it would require to make them up.  A fair point, but if we the community let them know how much we need these commands maybe they might decide to help us out.

So for starters, here are the commands that I'd like to see in patch 1.97 . . .  ;D


getElevation Vehicle - Returns the weapon elevation of an animated object such as a man or turret, in degrees.

getStance Vehicle - Returns the stance of a man object.  Returned value is one of "Standing", Crouched" or "Prone".

This command may be a bit hard to implement I know, since AFAIK "stance" is not a defined animation step or anything.  Besides, how would it work if it was applied to a vehicle or a weapon.  My answer ? - see the following . . .

entry configEntry Object - Returns the specified config entry value of the specified object.

For example, "modelOptics" configEntry "M16" would return "optika_M16".


I'm pretty sure that the first command is doable as it's simply an analogy to getPos, getDirection etc.

The second command is tougher, but if each CfgAnimation was modified to include the resulting "stance" of the unit then the last command would be able to return it.

And of course, the last command should be doable since the engine should know all these things anyway.  The only problem here is that it might be difficult for the engine to extract this info in game . . .   :-\

One last query - does anyone know if it is possible to define new entries in a config, and if so, can you use that info in any way ?  For instance, could I make a definition "burnable=true" or "breakable=false" or whatever ?

It would be really good to be able to define a new object characteristics and use that in game by way of a script or eventhandler or whatever (eg - if burnable configEntry _object = true then goto "burnRoutine").


That's my two cents worth.  Does anyone else have any ideas for new commands ?  Doe anyone know if the above is doable/ not doable/ silly ?

Thoughts and comments appreciated.

Cheers



Roni


Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Command Requests - please ?
« Reply #1 on: 19 Aug 2004, 11:00:08 »
Another few:

CreateMarker
SetMarkerText
PointAt (? Unitname PointAt ObjectName)
ChangeBriefingMain
ChangeBriefingPlan

:beat: *Gets Shot* :beat:

Unnamed

  • Guest
Re:Command Requests - please ?
« Reply #2 on: 19 Aug 2004, 15:33:23 »
There was a thread over at the offical forums about new commans for OFP2, never bothered to post there as it seemed to close to release. I guess thats not relevant now :(

My list, just to let off some steam :)

SetPos2
SetDir2 : both of thse do not affect the pitch and bank of on addon, unless there on the ground.

AI Autopilot off\on : Turn off the AI's desire to take off as soon as it starts a fixed wing aircraft on the ground.

Quote
Does anyone know if the above is doable/ not doable/ silly ?

You can attach additional parameters like strings using global arrays, and populate them from either an addons config or just regular mission scripts. If a unit has a rating then it does not matter how many you have in your mission, you can store its position in the array using raiting and a method someone posted here.

I started working on a global manager, that lets you add\retreive individual info associated with any soldier in the game. One problem I see is the savegame bug. I think you loose any changes to global variables during the mission, when you restart a saved game?

A simpler way would be to go straight to raiting, and store something similar to binary:

You ignore everything left of the decimal, as thats what OFP uses as the actual unit raiting. So the number in raiting as 15000.12113 would breakdown to:

1   : Burnable=True (0=False , 1=True)
2   : Team Respawn (0=Seagull,1=Respawn,2=TeamRespawn)
1   : Support (0=None,1=Heavy Weapon,2=Crew)
1   : Never Flees (0=False,1=True)
3   : Optics (0="optika_M16A",1="optika_M16B",2="optika_M16C",3="optika_M16D")


And so on, depends what you want to carry around with each unit. Plus I think the raiting does not get lost when a game is saved?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Command Requests - please ?
« Reply #3 on: 19 Aug 2004, 15:49:08 »
Also, great for SP:

ChangeSkin (unitname ChangeSkin "WestB")

:beat: *Gets Shot* :beat:

m21man

  • Guest
Re:Command Requests - please ?
« Reply #4 on: 19 Aug 2004, 16:08:08 »
GetPos [unit,"Memory LOD Selection"]

unit SetModel modelname

DBR_ONIX

  • Guest
Re:Command Requests - please ?
« Reply #5 on: 22 Aug 2004, 10:51:17 »
A setmodel command would be :o
;D
There is a script in the eds depot to get a planes bank/pitch.. Maybe have a look at that ;)
And when you gonna do that get stance script! :P
- Ben