Posted By: Dante_Scott
Treasure chest action - 11/24/08 00:43
-Will somebody please give me a Trasure chest action code. So that I can add a treasure chest that you can open to my level.
-I want it to Be like the door action on the old A5 template.
Best regards to all,
Dante
Posted By: MattyTheG
Re: Treasure chest action - 11/25/08 23:50
I feel bad since no one helped you, so even though I'm not really that pro yet I will give it a shot.
For starters, most people here probably won't simply write a code for you, as the point of the forums is to learn.
I would try to write something on my own first and then when you get errors, ask for more specific help. Anyway I will try to give you a basic outline of what I would do and hope that you will go from there, I hope no one thinks I am harsh, not too mention I don't really know the hard code for it, just ideas.
For starters make sure that you have a model of a treasure chest, and that it has an animation to play when it is opened. Secondly I would assign an action to the treasure chest that constantly uses a trace or scan function to see if the player entity is within a certain range. Then if the player is within your desired range, wait for a specific keystroke, then play the open animation. After that you could also have an ent_create to load a sprite of bubbles or a coin or whatever.
Hope that gets you in the right direction.
Posted By: MrGuest
Re: Treasure chest action - 11/27/08 00:11
give more info other than
Will somebody please give me a Trasure chest action code
is this a model with anims or an object that part of simply needs rotating?