1 registered members (TipmyPip),
18,631
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: ladder detection
[Re: 3run]
#313189
02/28/10 08:46
02/28/10 08:46
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Can some very kind person, help me to calculate dist from ladder to player in X coordinates? It's already done, but only in Y and Z coordinates... Need the same thing but only in X coordinates. I know, I'm not making any sense by just always asking for it... But this piece of player movemet really makes me going crazy... I've done every thing in player movement script for my FPS game called War Cloud. Only two things left... First is this ladder script (damn I really hate it  )... And second is elevators, but it will be easy to do... With help of AUM tutorials  I've tryed to get all that to work by myself... You can see it from my scripts I've posted... But I always fail  can't make the player leave the damn ladder when he walks away from it in X coordinates...
|
|
|
Re: ladder detection
[Re: 3run]
#313227
02/28/10 13:34
02/28/10 13:34
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
Serious User
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
|
Try something like, if (player.pan && (player.z = ?) { exit ladder; return; }
Last edited by Nidhogg; 02/28/10 13:35.
Windows XP SP3 Intel Dual Core CPU: E5200 @ 2.5GHz 4.00GB DDR3 Ram ASUS P5G41T-M LX PCIE x16 GeForce GTS 450 1Gb SB Audigy 4 Spyware Doctor with AntiVirus
|
|
|
Re: ladder detection
[Re: Random]
#313311
02/28/10 17:55
02/28/10 17:55
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
I've tried similar to Z coordinates, like this: if(player.x + player.min_x - 30 > my.max_x) { break; climb = 0; } But not working any way...  played with 30, doesn't make any sense... Now I hate ladder man... 
|
|
|
Re: ladder detection
[Re: 3run]
#313359
02/28/10 23:20
02/28/10 23:20
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
No one giving me the answer, for question I'm asking for... Is that so hard to help such newbie as me? Only thing I'm asking for is calculating distanse from ladder to player as it is already done in Y coordinates, need the same, but only in X coordinates, so if player for example walks backwards (or forward) from the ladder, and distanse is bigger for example than 15 (or smaller than -15), then player must leave the ladder... Will be very effective to create a ladder script I guess... I've stucked in this damn piece of script...  no problem with leaving the ladder, if player turned away from it, I'll fix it on myself, that will be very easy, player will be not able to turn away from it, he can only look around. I understand that I'm really badass and may be even asking too much, but I really stuck here  please some one, be so kind and help me. I'll be really grateful and will add name of person who will help me out, in the credits of my game, as a programmer that helped me with my game...
|
|
|
Re: ladder detection
[Re: Pappenheimer]
#313498
03/01/10 18:54
03/01/10 18:54
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Now it works well... Just need some testing and ladder script need some improvements  Thank you Superku!!! You're the best!  I'll add you in the credits of my project  Thank you all!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|