Home   Help Search Login Register  

Author Topic: Units in my group get in after I get in  (Read 612 times)

0 Members and 1 Guest are viewing this topic.

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
Units in my group get in after I get in
« on: 12 Aug 2004, 18:53:39 »
Hi everyone,

Just a small problem here that I know one of you out there will be able to answer in seconds ;D

What I'm trying to achieve is that when I get into the 5t truck (westtruck) my units get in after me into the cargo hold so that I dont have to order them in with the "Mount" command.

I know this sounds simple but I can't think of a solution and any input would be greatly appreciated. ;D

Cheers,

Hauk

Offline Mud_Spike

  • Contributing Member
  • **
Re:Units in my group get in after I get in
« Reply #1 on: 12 Aug 2004, 19:03:29 »
Make a repeating trigger, or a script-snippet with a loop, with the following condition:
Code: [Select]
vehicle playerUnit != playerUnitAnd put the following in OnActivation(/or later in the script):
Code: [Select]
"_x assignAsCargo vehicle playerUnit" foreach units group playerUnit ; units group playerUnit orderGetin true
(Syntax not guaranteed)

What it does is first check if the player's vehicle is not itself, and if so, assigns everyone in the players group as cargo (including the player, but that probably wont be a problem, probably. . . ), and finally orders them to get in.

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
Re:Units in my group get in after I get in
« Reply #2 on: 12 Aug 2004, 19:06:43 »
Cheers Mud_Spike I'll give it a shot

Thanks,

Hauk

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Units in my group get in after I get in
« Reply #3 on: 12 Aug 2004, 19:08:14 »
Why use playerUnit??
Simply player would be enough...

Unless this is MP... ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
Re:Units in my group get in after I get in
« Reply #4 on: 12 Aug 2004, 19:22:40 »
No it's a SP mission, why does that affect the game?

Hauk

Offline Mud_Spike

  • Contributing Member
  • **
Re:Units in my group get in after I get in
« Reply #5 on: 12 Aug 2004, 19:26:53 »
In multiplayer, the 'player' command may obviously return different players depending on which client the script is run on.
Whilst in a SP game, there is only one client, and thus, only one possible result from the 'player' command.

It's up to the mission designer to decide who is considered the "main" player and not.

Offline Hauk

  • Members
  • *
  • I sail under the Jolly Roger!! Pirates are kings!!
Re:Units in my group get in after I get in
« Reply #6 on: 13 Aug 2004, 00:08:53 »
Right I've tested the script and I made an external script with the following syntax:

Code: [Select]
#Vehicle

vehicle player != player

~0.1

goto "Vehicle"

exit

Everything seems ok there, and I typed the following code in the On Activation field of a Repeatedly trigger:

Code: [Select]
"_x assignAsCargo vehicle player" foreach units group player; units group player orderGetin true

Yet when I get in my vehicle they don't get in and just walk around as normal..

Any more suggestions?

Cheers,

Hauk

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Units in my group get in after I get in
« Reply #7 on: 13 Aug 2004, 16:14:58 »
Put the vehicle player != player in the triggers condition field...
Should work then...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.