View Single Post
  #6  
Old 05-31-2014, 12:35 AM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
Quote:
Originally Posted by callimuc View Post
Ah I now get it. You'd need to make a player class (like a health class) to check what the players z value is (inside the onActionLighthurt()) and control any further stuff from there on.

PHP Code:
function onActionLighthurt() {
  if (
player.z in |-33|) { //players Z value goes from -3 to 3
    //same as if (player.z >= -3 && player.z <= 3)
    //Do your stuff inside here
    
player.chat "'eyy";
  }

for the triggerAction() you'd only need to do triggeraction(player.x + 1.5 + vecx(player.dir) * 4, player.y + 2 + vecy(player.dir) * 4, "Lighthurt", player.dmg); now
Thanks for input!

I have a little side question though. How do I change the player's location on the screen?

For example, if I want the player a little further down the screen instead of centered?
Is this possible?
Reply With Quote