Home   Help Search Login Register  

Author Topic: problems with mp...  (Read 1355 times)

0 Members and 1 Guest are viewing this topic.

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
problems with mp...
« on: 20 Sep 2008, 16:18:08 »
 >:(
Hi!
I have some problems in MP playing with that mission ...
I'm using the "hostage" script, and client players can't make the "release" action scripts work well...
Can someone help me?
here is one of the script to set captive unit:
Code: [Select]
_hostage = _this select 0

removeAllWeapons _hostage
_hostage setCaptive true
_hostage switchMove "AmovPercMstpSsurWnonDnon"
_hostage setBehaviour "SAFE"
_hostage addAction ["release Karl", "hostages\set_freekarl.sqs"]
_hostage addEventHandler ["killed", {_this exec "hostages\set_dead.sqs"}]
_hostage disableAI "anim"

this one for the release:
Code: [Select]
_player = leader player
_hostage = _this select 0

?!(alive _hostage):exit
?!(alive _player):exit
_hostage enableAI "anim"
_hostage setCaptive false
_hostage playMove ""
_hostage setBehaviour "COMBAT"
_hostage removeAction 0
_hostage setrank "private"
[_hostage] join group _player
libre=true;
priso=false;
publicVariable "libre";
publicVariable "priso";
exit

The same for a "search" action:
Code: [Select]
player playMove "AinvPknlMstpSlayWrflDnon_medic";
player removeAction 0;
docupris=true;
docupaspris=false;
publicVariable "docupris";
publicVariable "docupapris";
exit

I have to do the actions (as the server) to have them working good and objectives to be updated
the mission is great (is it?), i wish it could be played online in mp...
Try the mission, tell me what kind of problem you encounter and if you have solutions...
Thanks a lot!!!
Fleepee

« Last Edit: 20 Sep 2008, 18:06:04 by Spooner »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: problems with mp...
« Reply #1 on: 20 Sep 2008, 20:26:12 »
How do you execute the hostage script, i.e. is it executed on all machines? Are you seeing the action but the action is not doing anything? The addAction must be done on all machines. The result of the addAction, your release script, is only executing on the machine of the player who used the action. Have the addAction publicVariable another boolean variable, say pvfreekarl, and add another trigger with Condition pvfreekarl to call your release script.
 
« Last Edit: 20 Sep 2008, 20:33:09 by Mr.Peanut »
urp!

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: problems with mp...
« Reply #2 on: 20 Sep 2008, 20:50:15 »
I think you're right, the addaction script was certainly not executed on all machines...
I will try your suggestion! thanks! :good:

(If I do understand, I have to create a small script setting a variable to true, then "publicvariable" it, to have the release script executed on all machines by the way of a dedicated trigger...)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: problems with mp...
« Reply #3 on: 21 Sep 2008, 01:54:41 »
Yes, you must do both of those things.  :yes:
urp!