Home   Help Search Login Register  

Author Topic: MP: Player surrender!  (Read 2006 times)

0 Members and 1 Guest are viewing this topic.

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
MP: Player surrender!
« on: 20 Oct 2004, 17:42:46 »
Hello and thanks for your attention ....

iam faceing some troubles with the MP surrender.... the scripts works excellent in SP ...
but in MP I guess iam doing something wrong .... I use the script wich was done by "unknown author" but you schould find it around here...

what iam doing is that I add a new action to there player there goes like this :

player addaction ["Surrender","captive.sqs"]

the action appears.... but there I get a error :

http://www.andenverdenskrig.dk/error.JPG

anyone that can explain this error ?  :'(
"words wich isnt is bringed to action, isnt worth saying.."

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:MP: Player surrender!
« Reply #1 on: 20 Oct 2004, 17:54:25 »
and yes the german guy got killed a couple of times ... poor him :P
"words wich isnt is bringed to action, isnt worth saying.."

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:MP: Player surrender!
« Reply #2 on: 20 Oct 2004, 18:21:39 »
allowfleeing syntax is:

Quote
unit allowFleeing courage
Operand types:
    unit: Object or Group
    courage: Number
Type of returned value:
    Nothing
Description:
    Set group courage. The less courage, the sooner will group start fleeing. 0 means maximum courage, 1 means always fleeing.

Example:
    soldierOne allowFleeing 0

So, whatever is passed to the script with _this array's second value, it's wrong. The value should be a number from 0 to 1 and not an object as the error message says it is.
I don't know exactly how you've got the scripts going on there, but remember that in MP the script that's run by the action command, is run only on the client who used the action.
Not all is lost.

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:MP: Player surrender!
« Reply #3 on: 20 Oct 2004, 18:22:24 »
heheh I just placed it in the units init field :S
"words wich isnt is bringed to action, isnt worth saying.."

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:MP: Player surrender!
« Reply #4 on: 20 Oct 2004, 21:13:35 »
Ah, so (_this select 1) is a parameter from the action command itself.
If my memory servers me correctly the second value in _this from an action is always 'the one who did the action'.

So if Bob pressed the surrender action (_this select 1) is Bob.

So your line would read _unit allowfleeing Bob when it should say Bob allowfleeing _number-from-zero-to-one or even (group Bob) allowfleeing _number-from-zero-to-one

So earlier in your script define _number-from-zero-to-one = 0-1 depending on what you want it to be, and then just change the line giving the error..


Still I must say, I don't understand what you're trying to accomplish with this allowfleeing command, as it does nothing to players, just the AI groups.  :o
Not all is lost.

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:MP: Player surrender!
« Reply #5 on: 20 Oct 2004, 21:39:14 »
well this is kind of secret beacuse itÂ's a MP project for inv44....

but my tougth was on that if the player realise that there is no point in to contiune running up and gets more good men killed they can surrender ... and be set in prison and then "die" and return home and respawn
"words wich isnt is bringed to action, isnt worth saying.."

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:MP: Player surrender!
« Reply #6 on: 20 Oct 2004, 21:44:11 »
Well, then allowfleeing will do no effect anyway.  ;D

[size=0.5](somebody prove me wrong)[/size]
Not all is lost.

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:MP: Player surrender!
« Reply #7 on: 20 Oct 2004, 21:53:31 »
Yeah maybe it wouldnÂ't pay off ... I wont surrender heheh :P

Just close this subject
"words wich isnt is bringed to action, isnt worth saying.."

Offline Kuro

  • Former Staff
  • ****
  • 2./FschJgBtl 251 Green Devils
    • VBS2 Mission Download Site
Re:MP: Player surrender!
« Reply #8 on: 21 Oct 2004, 05:38:57 »
Hallo,

i think i am the "unknown author", my surrender script is very beta. But if  you send me a link to your mission i can handle the problem for you.

Greetings
Kuro

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:MP: Player surrender!
« Reply #9 on: 21 Oct 2004, 15:51:11 »
Hi ... nevermind abourt it ... the feature would be lame anyway I dont think no one would use it ... or maybe a trouble maker would join the server surrender with the entire group and leave again ... would piss alot of I think so I leave that out
"words wich isnt is bringed to action, isnt worth saying.."

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:MP: Player surrender!
« Reply #10 on: 21 Oct 2004, 16:33:20 »
I think it's an excellent idea. The group leader should be able to decide if he wants to be a covard and save lives or go boldly where no man has survived before.  ;D
Just what you want the action to do exactly is another thing. Maybe it could delete all the group's weapons, setcaptive them and move to a prison.. not a bad idea!
Not all is lost.

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:MP: Player surrender!
« Reply #11 on: 21 Oct 2004, 23:06:40 »
yeah it would add a more realistic touch !
"words wich isnt is bringed to action, isnt worth saying.."