Home   Help Search Login Register  

Author Topic: Script problems....  (Read 493 times)

0 Members and 1 Guest are viewing this topic.

Dubieman

  • Guest
Script problems....
« on: 09 Aug 2004, 22:07:53 »
Got working on a new script. Its so the player can call alpha or something like that and a gunship or what you specify comes to help out. However it helps out indirectly by doing rocket attacks. ;D

I got the invisible target things I can use, its just I'm not sure if the script actually does anything. I know when an invisible target like the tank one I'm using is created, helis use rockets or hellfires way before using the cannon. However when I did my test mission, the apache only attacked with cannon....

The readme I redownloaded is in some language I can't translate using any translators...
But I picked up what each target is named...

Code: [Select]
LesIETA      - Unsichtbares Ziel Mann Ost
LesIWTA      - Unsichtbares Ziel Mann West
LesIGTA      - Unsichtbares Ziel Mann Guerilla
LesICTA      - Unsichtbares Ziel Mann Zivil

LesIAETA   - Unsichtb. Ziel gepanzert Ost
LesIAWTA   - Unsichtb. Ziel gepanzert West"
LesIAGTA   - Unsichtb. Ziel gepanzert Guer"
LesIACTA   - Unsichtb. Ziel gepanzert Civ"

The name I used was LesIAETA for a east tank.

Now the script...
;Gunship Support Script by GuiltyRoachKillar
;To use make a trigger and make it activated by radio Alpha
;in the activation field put [supporte,choppername,enemy leader,"typeoftarget"] exec "Gsupport.sqs"

Code: [Select]
;Gunship Support Script by GuiltyRoachKillar
;To use make a trigger and make it activated by radio Alpha
;in the activation field put [supporte,choppername,enemy leader,"typeoftarget"] exec "Gsupport.sqs"

_f = _this select 0
_heli = _this select 1
_e = _this select 2
_type = _this select 3
_pos = getpos _e
#check
?(_f knowsabout _e > 1.8): goto "prepare"
~2
goto "check"
#prepare
_heli domove _pos
_heli setcombatmode "Red"
_heli setbehaviour "DANGER"
_heli flyinheight 65
goto "check2"
#check2
_pos2 = getpos _e
goto "attack"
#attack
t1 = _type camcreate _pos2
exit

The player guy who calls the trigger/script, is called _f and the enemy is called _e...
I want the guy who called the script to at least know where the enemy is so it seems more realistic.

Seems simple, just want the target to be created at the dude's position so the chopper rockets the crap out of him. :-\ ;D :P

thanks :P
« Last Edit: 09 Aug 2004, 22:11:17 by GuiltyRoachKillar »

Offline Mud_Spike

  • Contributing Member
  • **
Re:Script problems....
« Reply #1 on: 09 Aug 2004, 22:36:11 »
The readme I redownloaded is in some language I can't translate using any translators...
Try german. :)

Code: [Select]
LesIETA      - Unsichtbares Ziel Mann Ost
...
LesIAETA   - Unsichtb. Ziel gepanzert Ost

Unsichtbares = Invisible
Mann = Man
Ost = East
gepanzert = armored

Code: [Select]
_heli flyinheight 65
goto "check2"
#check2
_pos2 = getpos _e
goto "attack"
#attack

A side note:
You really dont need 'goto "nameofLabelOnNextLine"' followed by that label (i.e., check2 and attack), but maybe thats something left from a previous incarnation of the script. :)

Maybe the chopper is attacking _e instead, and if a soft-target, makes the cannon an eligible weapon?
Try
Code: [Select]
_heli doTarget t1
(and if needed _heli doFire t1)

Oh, and I dont think "DANGER" is a valid SetBehaviour. Use "COMBAT" or "AWARE" instead. I could of course be wrong, hmm.


Dubieman

  • Guest
Re:Script problems....
« Reply #2 on: 09 Aug 2004, 23:49:31 »
OMG I'm such an idiot! ;D :D :-[ :P

I didn't know how to target what I just created cause I didn't know how to name it, but it was staring me in the face! :-[ :P

Gaa, that was dumb...

I'l use the dotarget and dofire commands. That's proly whats wrong... ::)


On the readme, I tried Germa, or translating german to english and it just gave me the readme over again, maybe I should try another translator. But I got the gist of it cause of the Panzer tanks in WWII, I associated it with gepanzerert and mann is pretty easy to understand. ::)


Quote
A side note:
You really dont need 'goto "nameofLabelOnNextLine"' followed by that label (i.e., check2 and attack), but maybe thats something left from a previous incarnation of the script.


Your right, I had a different structure before but found it didn't do anything so I scrapped it all, well not all of it. :)

Quote
Oh, and I dont think "DANGER" is a valid SetBehaviour. Use "COMBAT" or "AWARE" instead. I could of course be wrong, hmm.

I thought Danger was valid. I have used it on infantry who are normally set to alert and they crouch and go prone when I use Danger.
Its like the radio command in the radio menu. Go to #7 or something. I think Combat works too.... :-\ :P

Quote
Maybe the chopper is attacking _e instead, and if a soft-target, makes the cannon an eligible weapon?
Try
Code:_heli doTarget t1
(and if needed _heli doFire t1)

Yea that'd make sense... infantry = cannon....

But the invisble target has a high threat level so usually the opposing side goes nuts if it sees one... :P

Thanks, this solves a bunch of problems. ;)