View previous topic :: View next topic |
Author |
Message |
Akami23 Newbie cheater Reputation: 0
Joined: 19 Jan 2015 Posts: 18
|
Posted: Sat Jul 21, 2018 3:57 am Post subject: How to implement this feature? (No fall) |
|
|
This is 3th person game with bottomless pits. I want to make a script that can distinguish jumping from really high place to normal ground vs jumping to the bottomless pit.
So perchaps we can make somehow character cast some kind of a ray that check if there is a ground under him while character is in fall animation?
I already found a pointer where I can read "fall animation", but the problem is: fall animation when you jump from high ground VS to the botomless pit is the same. So I need to somehow check for the ground, but I don't know how.
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sat Jul 21, 2018 4:53 am Post subject: |
|
|
You might be able to find a pointer for the ground material (What tells the game the sound to make as you walk), this would be the thing to look for changes when scanning. Then no material means no ground under you, maybe.
_________________
|
|
Back to top |
|
|
Akami23 Newbie cheater Reputation: 0
Joined: 19 Jan 2015 Posts: 18
|
Posted: Sun Jul 22, 2018 8:26 pm Post subject: |
|
|
TheyCallMeTim13 wrote: | You might be able to find a pointer for the ground material (What tells the game the sound to make as you walk), this would be the thing to look for changes when scanning. Then no material means no ground under you, maybe. |
Thank you. I found ground material ID and that's work perfectly. For example "1" is stone surface, "3" is grass and what is important "0" is nothing. So technically we can detect fall state with it when pointer is 0. But how can we distinguish really long jump down (that could be up to 2 second) and jumping to botomless pit that can insta kill you in less than a second? Obviously I can't use just certain amount of time in order to activate teleport back because it would teleport me back
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Jul 22, 2018 8:51 pm Post subject: |
|
|
Best I can figure is to use a flag to allow the player to fall and use a hotkey to set it. This may require that you also wait for the material ID to change from zero before changing the flag back and preventing falling again.
_________________
|
|
Back to top |
|
|
|