|
-
_One of a Kind_
[help]how to make a water/lava tile...
hi
well i'm making a tile based adventure game and all but i cant figure out how to make a life system or have a water/lava tile that if u go in u loose a life!
any help would be very much appreciated!!
thanks!!
Fogle 
-
Feeling adventurous?
I don't know how experienced you are..
But all you have to do, is to check wether the player is in such a tile or not, and perform the appropriate action. You serve no code, so it's impossible for us to give you code.. And we shouldn't either, it's basic flash if you can make a tilebased game...
I don't have a photograph, but you can have my footprints. They're upstairs in my socks.
-
_One of a Kind_
Code:
game.Tile7 = function () {};
game.Tile7.prototype.walkable = true;
game.Tile7.prototype.frame = 5;
ok thats my code for the lava tile and what i need is that when the hero goes in the lava i have to have him start back at the beginning of the present map he is on and loose a life would making it like a door work??
and i am kinda experienced with flash i have been using it now for a little bit more than 5 months.
Fogle 
-
Style Through Simplicity
add somting like
game.tile7.prototype.damage = true
then you can check to see if the tile the hero is on will damage you in the same way you would check to see if a tile is walkable.
Not sure how your code is set out, so i cant help you with reseting the hero.
Ali
-
_One of a Kind_
cool thanks i messed around with it and it kinda works now!!
Fogle 
-
Say hello to Bob
Its just the same as what you have just shown, basically what Ali says would work and then just check the same way as you have done for the walkable tiles, then its just if it is hitting a damagable tile then reset the level, basically you already have placed the player before at the start of your game so do it again.
Im guessing you are just copying and pasting Tonypas tutorials into a flash file if not you wouldnt need to ask this so do yourself a favour and actually learn the code.
If our body is a clock ticking away and if while we experience all that this world has to offer time has still continued to pass, are we living or just experiencing a slow death?
-
_One of a Kind_
i did get it from tonypa but i'm going over each bit of code so nxt time i dont have to get it from somewhere!!
Fogle 
-
Say hello to Bob
Im glad to hear it.
Thing is you could have read about the prototype and checking for collision part of the code before you posted here and you would have sorted it yourself.
No matter though, ive done this kind of thing myself a couple of times where I post here thinking I cant figure something out and then it hits me immediatley after a couple of minutes of mucking around with the code, you have to make sure you have tried everything.
Good luck anyway.
If our body is a clock ticking away and if while we experience all that this world has to offer time has still continued to pass, are we living or just experiencing a slow death?
-
_One of a Kind_
No matter though, ive done this kind of thing myself a couple of times where I post here thinking I cant figure something out and then it hits me immediatley after a couple of minutes of mucking around with the code, you have to make sure you have tried everything.
Good luck anyway.
thanks!! and that's almost exactly what happened i was like in the middle of doing something els and wamm it hit me i was like wow how stupid am i!! lol
well later
Fogle 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|