Home   Help Search Login Register  

Author Topic: Can you belive it?!? Another script=another bug!!!  (Read 643 times)

0 Members and 2 Guests are viewing this topic.

Offline Burn

  • Members
  • *
Can you belive it?!? Another script=another bug!!!
« on: 10 Jul 2003, 04:25:18 »
Hi again all :wave:.  :oOooh crap :(... another script that I cant get to work :P. This is getting embarassing :-[. Well, I recon there's nothing else to do than to put on yer stomping boots and help me squash all the little suckas in this one too ;D... Aaanyways here it is :P:

This script is meant to get a group of morons to move out of their hiding place and go to a markers position. When all enemy units in an small trigger is dead their suppose to move to the next markers pos... but those suckas wouldn't move from their hideout even if I lit their frikkin asses on fire ;D :P. Take a look at it will ya :)?!

Code: [Select]
_o2=durras <------------------Trigger name.
_list1=list _o2<----------------Trigger list.
_sup=wgsuport  <------------Group of Loons that refuse to move.

_sup SetCombatmode "RED"
_sup SetBehaviour "COMBAT"
_sup SetSpeedMode "FULL"
;Suppose to change combatmode of group to "openfire engage at will"
;and behaviour to "combat"
;and finally speedmode to "full"

leader _sup domove GetMarkerPos pos1
;this is suppose to make the group leader move to marker "pos1".

@if (("_x" count east  _list1) == 0) then {leader _sup domove GetMarkerPos pos2}
;this is suppose to make the group leader move to marker "pos2" when all east soldiers in the trigger list are dead or out of the trigger area.

exit
;exit script.
And when that didn't work I tried:

Code: [Select]
_o2=durras
_list1=list _o2
wgsuport

wgsuport SetCombatmode "RED"
wgsuport SetBehaviour "COMBAT"
wgsuport SetSpeedMode "FULL"

#attack
leader wgsuport domove GetMarkerPos pos1
?(("_x" count list _o2) == 0):goto "move"
~60
goto "attack"
#move
leader wgsuport domove GetMarkerPos pos2
exit

No errors or anything, they just refuse to move >:(.
I know you can help me solve this, because I know how many talented scripters there are out there. So please help me :help:.
Thanks alot in advance :thumbsup:.
 :cheers:

gadolinite

  • Guest
Re:Can you belive it?!? Another script=another bug!!!
« Reply #1 on: 10 Jul 2003, 06:32:13 »
 :-[I may be wrong here.

 ;)I have tried marker motions moving to marker positions.  The do not work for me either, no matter what unit it is.  See for yourself, go to desert island and do a simple test mission and see if you can get anything to move to markers.  I can't, I bet you it's not possible.  

Try gamelogics instead.  If the marker serves another purpose besides moving to them, place them over top of the marker.  I have had better luck with moving to units, so give it a shot.    

_hammy_

  • Guest
Re:Can you belive it?!? Another script=another bug!!!
« Reply #2 on: 10 Jul 2003, 07:05:56 »
yep, a gamelogic should do jsut fine

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Can you belive it?!? Another script=another bug!!!
« Reply #3 on: 10 Jul 2003, 10:52:57 »
First off, this line:

leader _sup domove GetMarkerPos pos1

should be:

leader _sup domove GetMarkerPos "pos1"

if not:

leader _sup move GetMarkerPos "pos1"

Marker names should always be in quotes. Also, use move when working with the whole group, and domove when working with individual soldiers (though it will move the whole group if you use the leader... you'll run into problems if the leader dies though ;)).

The next (and main) problem is with this line:

@if (("_x" count east  _list1) == 0) then {leader _sup domove GetMarkerPos pos2}

You're trying to use an @ in conjunction with an if, which you can't do.
If you want to use an @, the stuff after it needs to be a true/false sort of statement. Also, I'm not too sure what you're trying to do with the count east _list1 thing there ;)

Try using a line like:

@ (east countside list trigger) == 0

and see if that gets it going ;)

Offline Burn

  • Members
  • *
Re:Can you belive it?!? Another script=another bug!!!
« Reply #4 on: 10 Jul 2003, 22:51:31 »
@gadolinite, HAMMY and Sui

 :oDamn ...thank you guys, for your very helpful input :D :thumbsup:... And thanks once again Sui :), for being the neverending source of knowledge that you are :thumbsup: :D.

@Sui
Quote
Also, use move when working with the whole group, and domove when working with individual soldiers (though it will move the whole group if you use the leader... you'll run into problems if the leader dies though ).
Won't the leader groupname command allways make the ai that currently is in charge move :-\?!? If not what was the correct syntax for acheiving that ???
"_x domove getpos object" foreach units groupname ???

Thanks again :D :thumbsup:
 :cheers:

deaddog

  • Guest
Re:Can you belive it?!? Another script=another bug!!!
« Reply #5 on: 10 Jul 2003, 22:55:23 »
If you want the entire group to move then simply do this:

groupname move getpos object

"_x domove getpos object" foreach units groupname

will work, too.  It's just the long way of doing it.  :)


Offline Burn

  • Members
  • *
Re:Can you belive it?!? Another script=another bug!!!
« Reply #6 on: 10 Jul 2003, 23:00:13 »
Ok :D... thanks for the ultra fast reply deaddog ;D :thumbsup:

Topic locked n' solved :D :toocool:... Thanks again all of you :wave:

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Can you belive it?!? Another script=another bug!!!
« Reply #7 on: 11 Jul 2003, 12:11:00 »
Sorry, just abusing my admin powers to clarify an editing point here ;)

@SuiWon't the leader groupname command allways make the ai that currently is in charge move :-\?!? If not what was the correct syntax for acheiving that ???

You're right, it will.

I was just trying to point out the difference between move and domove.

The move command is the same as giving the group a new waypoint (in fact that's exactly what it does).
The domove command will give an individual soldier a silent order to move to a position (same as you selecting the soldier through the Fx keys and clicking on a position).

What I meant is that if you use the domove command, and the leader dies, the group will stop. You will need to give them another domove command to get them moving again.

If you use the move command, the group will automatically keep moving to the position you told them to (as the position was given to the group, not individual guys).

As far as "_x domove getpos position" foreach units group goes...
This will work like move would, but the difference is that the group won't be moving like a group anymore (ie. in formation), they'll be a bunch of individual soldiers moving to the same place ;)

Anyway, hope that clears it up a bit...

Offline Burn

  • Members
  • *
Re:Can you belive it?!? Another script=another bug!!!
« Reply #8 on: 11 Jul 2003, 20:46:27 »
Indeed it did ;) :D. Thanks alot Sui :thumbsup: :toocool:
 :cheers: :wave: