Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 559 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Glide and z limitation #458437
03/09/16 20:15
03/09/16 20:15
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
Hello. Is there any other chance to limit z Glide?

I know disable_z_glide. But z glide is needed, so this is no option.
Also move_min_z is no solution. It does not really help.

I had the idea to limit z with this example:

c_move ............. GLIDE

If (my.z > 10) {my.z = 10)

So z 10 should never be exceeded.

But as far as I know Glide is checking the area 6 times.

So it seems that the my.z = 10 instruction does not really work. Only some frames later.
I saw that the model was exceeding this limit.

Is there any other idea to limit z?

Why is glide needed?

For example: Because some parts are a little bit higher than the base line. The enemy must walk over it with Glide. And im this example no part is higher than 9. So 10 would be a good limit. The problem are the walls. So it is possible that the enemy is gliding along a wall and is jumping on the top of it and back for a frame or more. And this should not happen.

Maybe there is a chance to limit z directly in the c_move, also with glide???



Re: Glide and z limitation [Re: Logitek] #458438
03/09/16 20:26
03/09/16 20:26
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I couldn't really understand what are you asking for, but you could use 2 c_move calls, one for XY movement with GLIDE flag set on and the other one for Z movement only but without GLIDE flag.

If you need to set something like 'max climbable step' for entity (so it doesn't step over it), I have some bad news for you, it will be pretty tricky to get one out of the box. You could take a look at the movement contribution that I've made, I used two models for the movement, one for Z only and the second one for XY movement, it allows you to adjust the 'max step' thing.

Take a look at this thread:
Movement code + AutoJumping

But anyway, if we are talking about enemies, this solution is going to be too performance eating. So I would suggest you just to place some invisible walls around places where enemies can't go (passable for player's movement, but not for enemies - this could be done easity with 'c_ignore' and groups).


Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Glide and z limitation [Re: 3run] #458439
03/09/16 21:35
03/09/16 21:35
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
Hi, thanks. I will have a look at it.

Re: Glide and z limitation [Re: Logitek] #458447
03/10/16 15:38
03/10/16 15:38
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline

Expert
Realspawn  Offline

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
you can use clamp to set its max and min z laugh

for example : my.z = clamp(my.z,800,1800);

800 = minimum z
1800 - max z

Last edited by Realspawn; 03/10/16 15:47.

Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: Glide and z limitation [Re: Realspawn] #458457
03/10/16 19:48
03/10/16 19:48
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
I think this will have the same result as the

if my.z > 10 then my.z = 10

instruction.

It will not prevent GLIDE to exceed it.

The problem is also that it happens only rarely. So it is difficult to test things. Possible that it does not happen for days. And then it happens again. But I will continue to test different solutions.

Anyway, thank you.

Re: Glide and z limitation [Re: Logitek] #458458
03/10/16 21:59
03/10/16 21:59
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Logitek
I think this will have the same result as the

if my.z > 10 then my.z = 10

instruction.

It will not prevent GLIDE to exceed it.

The problem is also that it happens only rarely. So it is difficult to test things. Possible that it does not happen for days. And then it happens again. But I will continue to test different solutions.

Anyway, thank you.
First of all, you have to understand why this happens (in order to fix the problem), to fully understand that, you have to know how collision system works, at least some basics of it. If you could post here some images showing your problem, it might be easier for us to help you, cause from what you've wrote above I didn't understand what exactly are you trying to do. Why you are trying to lock Z position and why it has anything to do with Z gliding. Please show us some screens/images explaining your problem.


Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Glide and z limitation [Re: 3run] #458486
03/15/16 12:06
03/15/16 12:06
Joined: Nov 2009
Posts: 201
Logitek Offline OP
Member
Logitek  Offline OP
Member

Joined: Nov 2009
Posts: 201
Hi, it doesn't matter anymore. I solved it with invisible high walls around that specific places, as you have said. And it is working fine.


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