Home   Help Search Login Register  

Author Topic: Players Sometimes Start In Water  (Read 2397 times)

0 Members and 1 Guest are viewing this topic.

Mr.BoDean

  • Guest
Players Sometimes Start In Water
« on: 28 Aug 2003, 05:38:57 »
  I have a mission I've made where there are 6 soldiers (non-grouped) who are standing half a meter apart on the shore on Desert Island. Playing solo, there are me and 5 AI on land. Playing MP , sometimes things are fine. But other times a player unit disturbingly starts in the water  ....and I mean in the FAR SouthWest corner of the map water. I even played this mission with Kaliyuga who was as baffled as I.  ???   ??? Playing the game twice in a row with no one switching roles can start you on land the first time and water the second!  :-\   :-\   As host, I've never been in the water, though.  8)
    I've tried re-creating the units. I checked the random-area respawn script and made it start 20 seconds into the mission, just in case. Oh, and all units are created with 0 proximity.

   Any ideas?
« Last Edit: 28 Aug 2003, 05:42:35 by Mr.BoDean »

Offline MeKillYou

  • Members
  • *
  • Looking for some prob, shout for me(hehe)
Re:Players Sometimes Start In Water
« Reply #1 on: 28 Aug 2003, 10:08:03 »
Dont know if this is going to help but try to change the
unit from "In Formation" to "none" it might help!

MeKillYou

Mr.BoDean

  • Guest
Re:Players Sometimes Start In Water
« Reply #2 on: 28 Aug 2003, 10:32:38 »
Dont know if this is going to help but try to change the
unit from "In Formation" to "none" it might help!

MeKillYou

K, thx ...I think they are already but will re-check. Played with someone who heard of this bug before and said someone found solution but not sure what it was.  :-\

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Players Sometimes Start In Water
« Reply #3 on: 28 Aug 2003, 15:50:52 »
Hmmm, I have 2 ideas.

#1: Might be an addon.

#2: Have you tried setpossing the players at the start of the mission? Getting their pos and then setpos them after half a second.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Players Sometimes Start In Water
« Reply #4 on: 28 Aug 2003, 19:14:39 »
If a respawn location isn't seen as valid, then you are likely to find yourself spawning in the sea

This can easily be tested by creating a simple mission, create an east soldier and an ellipse respawn incorrectly named
respaw_east

It wont recognise it as a respawn and you will end up somewhere wet

So the chances are there is a flaw in your random respawn script
or
you are using a script that re locates a soldier based on his initial starting name, such as W1

when he respawns he will no longer be called W1 or be part of a players Array unless you have in some way updated that array

So basically either
1)Respawn marker isnt seen as valid
2)Player isnt seen as he was before he died by the script you are using
3)Packet loss


hope this helps ya out m8
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Mr.BoDean

  • Guest
Re:Players Sometimes Start In Water
« Reply #5 on: 28 Aug 2003, 22:11:19 »
If a respawn location isn't seen as valid, then you are likely to find yourself spawning in the sea

This can easily be tested by creating a simple mission, create an east soldier and an ellipse respawn incorrectly named
respaw_east

It wont recognise it as a respawn and you will end up somewhere wet

So the chances are there is a flaw in your random respawn script
or
you are using a script that re locates a soldier based on his initial starting name, such as W1

when he respawns he will no longer be called W1 or be part of a players Array unless you have in some way updated that array

So basically either
1)Respawn marker isnt seen as valid
2)Player isnt seen as he was before he died by the script you are using
3)Packet loss


hope this helps ya out m8

Hmmm ....some interesting ideas, guys, thanks. But to clarify, I'm using the same script on each player and called in the same way,, yet some of the players start on land and some in the water. Why wouldn't it be the same for all?
   More importantly, are you saying that the script is activating before the game starts ,thinking the player is DEAD since he is not yet ALIVE and therefore (RE-) spawns him? I am using the same type of script in another mission and never had any issues like this.  I also added the  ~20 so that NO RESPAWN activity would take place till well into the game.

Units named P1 thru P6
Init. line of each: removeAllWeapons this; this exec "WeapAtDeath.sqs"

Here is the script:

Code: [Select]
;; WeapAtDeath Script -modified

~20

#START
@!alive player
_deadspot = getPos player

@alive player
removeAllWeapons player
player setPos [(_deadspot select 0) + random (25), (_deadspot select 1) + random (25), 0]
goto "START"

BTW, if you are one of the lucky ones who start on land, the script works perfectly for respawn.  :P


Edit:  Hmm, since I copied stuff over, I just realized I called the script using this instead of [P1] exec "WeapAtDeath.sqs" previously.  :-X  :-X    Could that have that much of an effect?
 
« Last Edit: 28 Aug 2003, 22:22:14 by Mr.BoDean »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Players Sometimes Start In Water
« Reply #6 on: 29 Aug 2003, 01:52:01 »
well first thing i would do rather than have the player exec the script in his init field, simply run it from the Init.sqs

If you intend to run this map on a dedicated server then use the following line in the init.sqs

? !(local server):[] exec "WeapAtDeath.sqs"
You use the reserved variable "player", so the above line will be sufficient



obviously make sure you have a gamelogic called "server"
I dont know, if running your script on the server could cause you a problem, but seeing as there isnt a player run locally on a dedi server, then you dont want the server runninmg the script anyway

If its to be run on a Player/server then use the filter line
?(local player):  

etc etc

If you have an intro running, then you may be better using

@time>20
rather than ~20
at the start of your respawn script

« Last Edit: 29 Aug 2003, 01:54:30 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Mr.BoDean

  • Guest
Re:Players Sometimes Start In Water
« Reply #7 on: 29 Aug 2003, 22:53:40 »
well first thing i would do rather than have the player exec the script in his init field, simply run it from the Init.sqs

If you intend to run this map on a dedicated server then use the following line in the init.sqs

? !(local server):[] exec "WeapAtDeath.sqs"
You use the reserved variable "player", so the above line will be sufficient



obviously make sure you have a gamelogic called "server"
I dont know, if running your script on the server could cause you a problem, but seeing as there isnt a player run locally on a dedi server, then you dont want the server runninmg the script anyway

If its to be run on a Player/server then use the filter line
?(local player):  

etc etc

If you have an intro running, then you may be better using

@time>20
rather than ~20
at the start of your respawn script

As many times as I've read this post and the MP tutorial by Snypir, I'm still fuzzy on this whole server/client / ded server thing. I never knew you would have to have  2 different versions for host/player   and for dedicated .  :o  :-X  And my few attempts at making scripts ONLY work on client PC's or ONLY on the server met with usually poor results like the scripts not working at all.  :-\

   AT any rate, the water problem seems to be solved , but my other simple script that is glitched s just a few kill zone triggers.

Triggers set up like this:
 West Present  -  6 seconds
On Activation: [] exec "Death.sqs"

Script:
Code: [Select]
;;Death.sqs

player setdammage 1
exit

This works fine, except that sometimes it kills EVERY PLAYER even though only one is standing in the trigger. How should I change this? Should I add this?   ???

Code: [Select]
_dummy = this select 0

_dummy setdammage 1
exit

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Players Sometimes Start In Water
« Reply #8 on: 29 Aug 2003, 23:09:44 »
two ways to set up your killzone trigger

either set it to East west etc
or
set it to anybody and in the condition field place the following

((vehicle player in thislist)AND(side player==EAST)

where you want to kill east


In all cases use the following for your Activation field

(vehicle player in thislist) exec "Death.sqs"

then only players who have activated the trigger will run the script


I would also add a little titletext line to the Death.sqs explaining to the player why he was just killed and also an outer warning zone to warn him of his impending death should he continue on his present course


titletext[format["\n%1\nYou entered a restricted area",name (player)],"PLAIN DOWN"]


« Last Edit: 29 Aug 2003, 23:10:46 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Mr.BoDean

  • Guest
Re:Players Sometimes Start In Water
« Reply #9 on: 30 Aug 2003, 01:24:32 »
Ok, Terox, Thanks a lot. So if I use the Vehicle player in thislist  , I don't need to change the script, eh?

Mr.BoDean

  • Guest
Re:Players Sometimes Start In Water
« Reply #10 on: 02 Sep 2003, 05:11:59 »
two ways to set up your killzone trigger

either set it to East west etc
or
set it to anybody and in the condition field place the following

((vehicle player in thislist)AND(side player==EAST)

where you want to kill east

In all cases use the following for your Activation field

(vehicle player in thislist) exec "Death.sqs"

then only players who have activated the trigger will run the script

I would also add a little titletext line to the Death.sqs explaining to the player why he was just killed and also an outer warning zone to warn him of his impending death should he continue on his present course

titletext[format["\n%1\nYou entered a restricted area",name (player)],"PLAIN DOWN"]

Okay TEROX, I used the lines you moted above and added the Warning triggers around the kill zone triggers. Worked great for me solo. Then I played with others and whenever one of them got into a kill zone, they were repeatedly killed even when they were no longer in the kill zone.   :-X

So then I noticed and changed the exec line from:

(vehicle player in thislist) exec "Death.sqs"

to

[vehicle player in thislist] exec "Death.sqs"


This again worked fine for me solo, but now the triggers or script don't fire for anyone but me.

i.e. another player goes into the kill zone and is neither warned nor killed ...only I am if I enter.

 ???   ???   ???   ???   ???   ???

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Players Sometimes Start In Water
« Reply #11 on: 02 Sep 2003, 17:54:05 »
on my missions i use the following trigger

For WEST Safezone
Anybody/repeatedly
Condition:(vehicle player in thislist)AND(side player==EAST)
On Activation: (vehicle player in thislist) exec "kill.sqs"



;;Kill.sqs
titletext[format["\n%1\nYou entered a restricted area",name (player)],"PLAIN DOWN"]
PlaySound "numnuts"
vehicle player setdammage 1
#End
Exit



Ya dont need PlaySound "numnuts", as this is a custom sound i use

also is this played on a dedi server or a player/server

do you have a gamelogic named "server"
and do any of your scripts use
?(local server):
or
?!(local server)

sounds to me that some scriopt somewhere is being run on all clients instead off the inteneded client, or is run on the server when it shouldnt be


If you do not want a script run on the dedicated server use:
?(local server):exit

if you only want a script run on a server then use
?!(local server):exit

if this does not solve your problem please post the trigger settings you are using and the scripts you are using for the safezone kill etc etc
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Mr.BoDean

  • Guest
Re:Players Sometimes Start In Water
« Reply #12 on: 02 Sep 2003, 19:06:55 »
on my missions i use the following trigger

For WEST Safezone
Anybody/repeatedly
Condition:(vehicle player in thislist)AND(side player==EAST)
On Activation: (vehicle player in thislist) exec "kill.sqs"


Still surprised you don't need [ ] to call a script, but I will switch back.   :o

Quote

;;Kill.sqs
titletext[format["\n%1\nYou entered a restricted area",name (player)],"PLAIN DOWN"]
PlaySound "numnuts"
vehicle player setdammage 1
#End
Exit

OK, I changed my Death (Kill) script to this  ...main difference being vehicle added.

Quote

also is this played on a dedi server or a player/server
Quote
 

player/server right now


Quote
do you have a gamelogic named "server"
 Yes
Quote
and do any of your scripts use
?(local server):
 or
?!(local server)

No , But My "WeapAtDeath.sqs" Respawn/Weapon removal script is run from Init.sqs with :

Code: [Select]
?(local player):[] exec "WeapAtDeath.sqs"

Quote
sounds to me that some script somewhere is being run on all clients instead off the inteneded client, or is run on the server when it shouldnt be

If you do not want a script run on the dedicated server use:
?(local server):exit

if you only want a script run on a server then use
?!(local server):exit

Right, so for your Kill script on a player/server  would  I also want to add:
 
?(local server):exit

OR

?!(local player):exit

 ???  ???  ??? Thanks again !
« Last Edit: 02 Sep 2003, 19:08:44 by Mr.BoDean »