Home   Help Search Login Register  

Author Topic: Problems with setCaptive  (Read 1020 times)

0 Members and 1 Guest are viewing this topic.

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
Problems with setCaptive
« on: 30 Apr 2003, 08:46:54 »
I have an annoying problem and I need your help guys.  :'(

I've made a multiplayer Vietnam mission that contains a few scripts, other than enemies and stuff. At one point in the mission, your whole team of 3 gets captured by the enemy. First there is a film sequence and during that sequence I move around the players to certain spots, where they will be standing after the film has ended. I also "teleport" some VC's to surround them.
Now all the players have been set to "setCaptive true" in the same script that I used for moving them about. In the editor everything goes as planned. The players appear in a house, the enemies stand outside, holding their fire.
When playing the mission in multiplayer however, the "setCaptive" command only applies to the host and possible AI players. If another human player joins the game, the enemy for some darn reason starts firing at him!
I have tested this several times now with a friend, and it doesn't matter which character he picks in the pool, the enemy still fires at him, leaving me and the AI alone.
Why is it that "setCaptive" apparently sometimes doesn't work in multiplayer? I have thought about whether the script should be executed in a different way.

At the moment the trigger looks like this:

condition: not alive vc1 && not alive vc1_1

on activation: [this] exec "trap.sqs"

maybe it should rather be executed like: [] exec "trap.sqs",
instead of [this] (not very good at scripting but I believe that "this" is unnecessary).

I know that the script "trap.sqs" works in single player so why shouldn't it in multi? There are some camera, "setpos"  and "addweapon" commands, stuff like that, but other than that just "player1 setCaptive true" and "player2 setCaptive true" etc.

Plz help, you are the best   ;)
Weeee...

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
Re:Problems with setCaptive
« Reply #1 on: 30 Apr 2003, 08:49:20 »
lol you guys... just noticed that another guest here on these forums has posted the same question as I just did, sorry... well help!
Weeee...

GodHatesUsAll

  • Guest
Re:Problems with setCaptive
« Reply #2 on: 30 Apr 2003, 10:55:22 »
Not sure...

Try just [] exec, without [this].

Also try this:

Make a trigger for each player, with detection on west. Group each player to ONE trigger each.

Set the trigger to repeatedly, Also, put the triggers with radius of 2/2, and put each trigger in the house.

In the Activation Field put: yourunitname setCaptive true.

Now everytime the west player is within its own trigger that it is grouped with, the trigger should set off, and make him setCapitved!