Author Topic: Conditionals not working as expected  (Read 28 times)

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Conditionals not working as expected
« on: September 13, 2020, 05:49:40 PM »
The last conditional, wall slide looks like returns true even when the player is just on mid air. What's the reason of this?
Code: [Select]
//Player 1 - Looping Command Prompt
if defend > 0
defend - 1
if defend > 16
{
     color = yellow
     effect = diamond out
     remove hurt = true
}
else
remove hurt = false
<area name>[defend]
if wall slide = true
reset char sprite
Sorry because my English is not very good because I'm Spanish ;) :P

TingThing

  • Admin and Developer
  • Level 20: Nobom
  • *
  • Posts: 1061
  • Total likes: 17
  • Creator and Developer of Platform Builder
    • View Profile
    • Platform Builder Home
Re: Conditionals not working as expected
« Reply #1 on: September 18, 2020, 11:22:19 PM »
try "if wall sliding = true"



"wall slide" is for changing the player's ability to slide on walls, not for checking if the character is sliding on walls.


Sorry, I know that can be a little confusing.

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1573
  • Total likes: 15
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Conditionals not working as expected
« Reply #2 on: September 19, 2020, 06:32:08 PM »
try "if wall sliding = true"



"wall slide" is for changing the player's ability to slide on walls, not for checking if the character is sliding on walls.


Sorry, I know that can be a little confusing.
Yeah, I noticed that after reporting this, sorry. In fact, it should not be confusing at all because one is the verb and one is the noun xd
Sorry because my English is not very good because I'm Spanish ;) :P