Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,392 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
anti-stuck methods after c_move? #190137
03/25/08 10:09
03/25/08 10:09
Joined: Mar 2005
Posts: 969
ch
Loopix Offline OP
User
Loopix  Offline OP
User

Joined: Mar 2005
Posts: 969
ch
Hello friends!

I'm looking for snippets and methods to un-stuck my chars when they 're caught in narrow canyons an the like. The code should check if move distance could be performed (when using c_move). If the move distance (over a certain time) was less than a certain amount of quants (while the move force remained...), there should be some kind of un-stuck function called.

Note: It should work with model-levels!

I'm sure some of you have experance in this issue I'd be happy about suggestions and help...thx!

Re: anti-stuck methods after c_move? [Re: Loopix] #190138
03/25/08 13:03
03/25/08 13:03
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
What would you like the 'unstuck code' to do? Resetting the moving model to a different position will look weird I think, so instead you'd be looking for code that prevents getting stuck in the first place, right?

Perhaps you should try to add a certain amount of upward force when moving forward, while still tracing the ground distance and so on to keep the model on the ground. It's probably a bit of an ugly solution, but it seems to work for me,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: anti-stuck methods after c_move? [Re: PHeMoX] #190139
03/25/08 13:12
03/25/08 13:12
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
I think I know exactly what he means.

@Loopix: Did you use GLIDE as parameter in c_move? This could be an easy solution!

Otherwise you have to look for a pathfinding solution where you place nodes aroud the player that you can trace. The nodes leading to your target and being hit without a barrier form the right path to your final target

Re: anti-stuck methods after c_move? [Re: PadMalcom] #190140
03/25/08 13:41
03/25/08 13:41
Joined: Mar 2005
Posts: 969
ch
Loopix Offline OP
User
Loopix  Offline OP
User

Joined: Mar 2005
Posts: 969
ch
Thanks guys! I use glide and also c_rotate and c_move all the time, including object avoidance trough c_trace...still the chars can get cought in narrow corners. Thats why I'm looking for examples from people who have dealt with this issue...i'm just too stupid to find a well working general unstuck solution myself.
Again: The unstuck code should only be executed after some time elapsed with no movement distance but movement force applied....maybe the entity should c_rotate 180'...decrease it's gravity a little and increase its x_speed for a short a while before it targets it's given waypoint again....dunno

Re: anti-stuck methods after c_move? [Re: Loopix] #190141
03/25/08 14:04
03/25/08 14:04
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Do you want to display a message "You got stuck, game will place player in a free position"? This is no adequate solution I think.

When this happens rarely you could easily place invisible blocks in tricky corners so that the player can't even get there.

I will try to find a solution tonight and post it tomorrow if possible.

EDIT:
My try would be store the last 3 positions of the player and set it back until I can trace again in all directions.

Last edited by PadMalcom; 03/25/08 14:10.
Re: anti-stuck methods after c_move? [Re: Loopix] #190142
03/25/08 15:59
03/25/08 15:59
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Have you tried my.polygon = on...
If so what about the the c_minmax i think it is..


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

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1