Home   Help Search Login Register  

Author Topic: Scripts  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

O Neil

  • Guest
Scripts
« on: 24 Oct 2002, 07:57:10 »
I hate to ask this cause I look gay but I'l do it anyways.

I got a load of script to use that do things like hit people,AI  set sathual charges, and they look like this:

                           Unitname action ["SITDOWN"]

AND NONE OF THEM WORK !!!

I've tried putting them in the waypoints, inti fields blah blah, none work.

soz                  :'( :'( :-[ :'( :'(

Crassus

  • Guest
Re:Scripts
« Reply #1 on: 24 Oct 2002, 12:09:45 »
I'll take a stab at it...The syntax looks fine...But would you attach you scripts/mission so I can take a gander at what you have?

With regard to the unit placing the stachel charges, does the command look like this: <unit name>["PUT", "PIPEBOMB", "PIPEBOMB"]?

Is that unit capable of placing a "pipebomb", i.e. either a Black Op, or a unit for which you've used removeMagazine "Handgrenade" and addMagazine "Pipebomb" to get them to carry satchels?

O Neil

  • Guest
Re:Scripts
« Reply #2 on: 25 Oct 2002, 09:21:45 »
Um, soz, na it doesn't look anything like that, that was just in general, there are about 20 more scripts like that.
I don't have a mission with those because I was just trying them out.

Soz      :-\

The_Milky_Bar_Kid

  • Guest
Re:Scripts
« Reply #3 on: 27 Oct 2002, 23:24:29 »
Well the action command is slightly more complicated than peole think (even me, gosh that sounds big headed).  For instance, I was trying to make a soldier drop his weapon, I tried:

soldier action ["dropweapon", weapon "AK74]

turns out I needed:

soldier action ["drop weapon",soldier,0,0,"AK74"]

so as you can see, it was due to my lack of knowledge that I got it wrong.  I'm not saying that the people who made those scripts are stupid, but I'm saying this command confuses the best of us.

O Neil

  • Guest
Re:Scripts
« Reply #4 on: 29 Oct 2002, 08:23:30 »
SO does that mean it goes in the activation feild of the waypoint ? and that I'd just have to playa round with it until it works.

Thxs

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Scripts
« Reply #5 on: 29 Oct 2002, 11:46:31 »
O Neill, just to be sure:

If i got this right, you just want to try out some commands, like "Unitname action ["SITDOWN"]" ?

To test it, you just need to put this command into the init field of a soldier, for example and then start the mission to see how it works.

(in case you don't know):
if you just paste "Unitname action ["SITDOWN"]" into the field, it won't work. "Unitname" is a placeholder - you need to replace that with the name you gave the soldier in your mission (unit1 for example).

If i got this all wrong and you knew that already, sorry for wasting your time, but your requests sound a bit 'confusing'.  ;)

O Neil

  • Guest
Re:Scripts
« Reply #6 on: 08 Nov 2002, 11:28:30 »
soz

Yea, I put                  aCarrier action ["SITDOWN"]
in the activation field of a waypoint, it didn't work !!! >:(

CareyBear

  • Guest
Re:Scripts
« Reply #7 on: 15 Nov 2002, 16:10:16 »
Okies.. actions are complicated.. but there are a few tings..

1) to use the sit down action, unit must be in 'safe' mode - ie, with gun on back. You're better off (for sittin down) using a playmove command to force the unit to play a particular animation (of which sit down has about three variants).

You can find a full list of the animations in the Unofficial Command Reference.. check the Ed Depot. Pretty sure it's in there somewhere. It also has weapon names and ammo names for v1.46 (not resistance, unfortunately)

For actions... Most actions use the syntax
unitname action ["actionname", actiontarget]

so, for soldier1 ejecting from heli1, you'd use:

soldier1 action ["EJECT", heli1]

As far as specific lists of actions go.. I don't have one. There is a set of actions in the Unoff Comref, but I haven't used those particular ones and don't actually know if they work or not. Also, u could try "SIT DOWN" instead of "SITDOWN".

Basically, each type of action has it's own syntax for the array of information you feed it. Most only require action type (the string) and action target (the object u execute the action on.. ie, you eject from the heli). Some require a lot more.. and each action could be quite different.

If there's a full list anywhere, I'd like to see it too...  ;D

Oh, for sittin down, try this - put a waypoint for da soldier named aCarrier with behaviour "SAFE" or "CARELESS", then in the 'onactivation' field of the waypoint, put

aCarrier playMove "effectstandsitdownver2"

aCarrier will sit down. He will probably get up again pretty soon tho. One way to make him stay there is to use a script. Do this... in the onactivation field of the waypoint, put this..

[aCarrier] exec "sitandstay.sqs"

then make a file called sitandstay.sqs in ur mission directory. It should be:

******************
_unit = _this select 0
_unit playmove "effectstandsitdownver2"

#loop
~2
_unit switchmove "effectstandsitdownver2"
goto "loop"

*************

He will sit there till kingdom come. (switchmove is like playmove, but it puts the unit into the new animation without a transition.. ie, if u used it on him when he was standin, he'd go straight to sitting)

hope dat helps

CareyBear