Home   Help Search Login Register  

Author Topic: activation on a domove  (Read 2440 times)

0 Members and 1 Guest are viewing this topic.

LimeCordial

  • Guest
activation on a domove
« on: 25 Aug 2002, 20:51:12 »
i have a mission where the player can call for renforcements to his squad if he thinks he needs it.......but they are going to be paradropped. there isnt a problem in that itself, but because the player could be anywhere when he calls for them, i want the helo to move to where he is THEN drop them. i have the waypoints for the helo and there is a move waypoint near the operation area, in which on the on activ i have written 'ch doMove getpos p'.

ch is the name of the helo and p the player.

i want the helo to move to the player like i have written, but i dont want him to drop the troops until he is there. can i doo that?  ??? :-\

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:activation on a domove
« Reply #1 on: 25 Aug 2002, 21:26:40 »
in your script put this

ch doMove getpos p
@unitready ch
then all the eject stuff goes here

you might want to try distance instead of unitready

@ch distance p <150
« Last Edit: 25 Aug 2002, 21:30:54 by Black_Feather »

LimeCordial

  • Guest
Re:activation on a domove
« Reply #2 on: 25 Aug 2002, 21:35:32 »
so in the move waypoint i put

[ch, rein1] exec "eject.sqs"

then in eject.sqs i have that in front of the eject lines?

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:activation on a domove
« Reply #3 on: 25 Aug 2002, 22:03:22 »
Quote
so in the move waypoint i put
[ch, rein1] exec "eject.sqs"

No;

If you want to use the domove, then forget about
the waypoint.
Ch moves to the position of unit p
This could be far away from the waypoint (at least far
enough, so that Ch never passes the waypoint).
So the activation field of this waypoint will never become
active.

Black_Feather already gave you the point, where you can
exec your script:

#ejectloop
@ch distance p <150: goto "ejectsequenze"
~1
goto "ejectloop"
#ejectsequenze
[ch, rein1] exec "eject.sqs"

:edit
P.S: another way, would be:

Once the player calls for the reinforcement, forget about
the domove command, and use setpos/getpos to place
the waypoint, where Ch should move to (and drops them off)
on the position of p

:note - don't forget to setpos/getpos the waypoint, before
the chopper starts moving, otherwise the ai could get
confused because of a changing waypoint, during heading
onto it.
By using this method, you wouldn't need a script (except
the paradrop script)

~S~ CD
« Last Edit: 25 Aug 2002, 22:08:37 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

LimeCordial

  • Guest
Re:activation on a domove
« Reply #4 on: 25 Aug 2002, 22:09:41 »
in your script put this

ch doMove getpos p
@unitready ch
then all the eject stuff goes here

you might want to try distance instead of unitready

@ch distance p <150

no, you see, he told me to put the do move part in the script.

and you can't name waypoints.
« Last Edit: 25 Aug 2002, 22:12:34 by LimeCordial »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:activation on a domove
« Reply #5 on: 25 Aug 2002, 22:35:20 »
Quote
in your script put this

ch doMove getpos p
@unitready ch
then all the eject stuff goes here

you might want to try distance instead of unitready

@ch distance p <150

no, you see, he told me to put the do move part in the script.

1) - can't you see, what he wrote in there?
Quote
@unitready ch
then all the eject stuff goes here

This means, you should put your exec paradropscript
there.

Quote
no, you see, he told me to put the do move part in the script.

He didn't tell/recomend you to use it in a script, he only
answered your question.

Quote
and you can't name waypoints.

And what do you think, is this for?

taken from the official comref (BIS)
Quote
getWPPos waypoint
Operand types:
    waypoint: Array
Type of returned value:
    Array
Compatibility:
    Version 1.21 required.

Description:
    Get waypoint position. Waypoint format is Waypoint .

Example:
    getWPPos [groupOne, 1]


I gave you 2 different solutions above;

1 with using all that stuff in a script,

2 with using no script (except the paradrop script)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:activation on a domove
« Reply #6 on: 25 Aug 2002, 22:36:30 »
Heh, well, you can actually use your original idea with the activation line in the waypoint: just move the waypoint itself!

[groupName, #]setWPPos getpos aP

groupName = name of the group the waypoint belongs to, just make it group HelpHeli for easy use. # = number of waypoint being moved, 0 is the "invisible" waypoint created on your units location, 1 is the first waypoint you place etc. So just figure that one out.

getpos aP= just a simple getpossing of aP, and suddenly, nr # waypoint for group groupName is right on top of aP ;-D

Good luck! :thumbsup:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

LimeCordial

  • Guest
Re:activation on a domove
« Reply #7 on: 25 Aug 2002, 23:07:50 »
ive got

grouphelpheli, [2]setWPPos getpos p

in the on activ of the trigger, but just get an error when i activate the trigger.

name of player is p, and i called the heli grouphelpheli.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:activation on a domove
« Reply #8 on: 26 Aug 2002, 00:55:02 »
Well LimeCordial, this one is working for sure (just been
testing it):

[groupheli1, 2] setWPPos [(getpos p select 0), (getpos p select 1), (getpos p select 2)]

:note - waypoint nr. 2 must really be the second waypoint
of groupheli1. Counting of waypoints doesn't start at zero
in this case.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted