Easy way to display damage/point indicators?
Ok, so in this game I'm making, I'm using the same set up for displaying damage delt to enemies and points received from powerups. These numbers vary over time due to multipliers and such, so I can't just have a simple text object display the same number each time.
So what I did was create a counter object at the scene with a behavior that fetches the alt values from the player character and the enemy to do a quick calculation to display, then destroy itself after it finishes its movement (goes straight up a bit).
The problem is that when multiple such counters are created, every single one gets the same number and all get destroyed at the same time (when the first one on screen triggers it). I thought that using behaviors would limit those conditions/actions to just the one instance of the counter... otherwise wouldn't you just use the frame's condition panel?
Re: Easy way to display damage/point indicators?
I am not sure if this will work in your situation, but there is a workaround for distinguishing strings and counters.
You simply set each object to its own, unique direction. That is, if they are stationary to begin with. That gives you a limit of 32 object instances to pick from.
Re: Easy way to display damage/point indicators?
Try using something like:
* Enemy takes Damage
> Create Counter at Enemy
> Set Counter to Damage
Assuming the counter has a movement that stops after a while
* Counter Has Stopped
> Destroy Counter
This should make MMF automatically select only the affected counters instead of all of them.
Re: Easy way to display damage/point indicators?
I had a problem with this for a while, too - I'm now using the Text Blitter object for the purpose.
Re: Easy way to display damage/point indicators?
Try this link:
http://www.create-games.com/download.asp?id=6864
Re: Easy way to display damage/point indicators?
Quote:
Originally Posted by Novabrain
You simply set each object to its own, unique direction. That is, if they are stationary to begin with. That gives you a limit of 32 object instances to pick from.
Is there a simple way to do this? It seems like you'd have to have 31 different conditions to check if there already exists an object facing the given direction before creating a new one... Sounds like a good workaround if there's an easy way to implement it, though.
Quote:
Originally Posted by Werbad
Try using something like:
That is EXACTLY like what I had, just not using behaviors. And it worked... I wonder why the behavior selected all instances of the object instead of just the one.
Quote:
Originally Posted by DavidN
I had a problem with this for a while, too - I'm now using the Text Blitter object for the purpose.
Er, could you explain yourself a little more, please? How did you use Text Blitter for this purpose?
Quote:
Originally Posted by lembi2001
Try this link:
Eh, that only allows one instance of the damage indicator at one time, but it does work rather well, thanks.
_____________________
Ok, I have a new problem now... If ever I create two or more counters at the same time, one has the correct value, and the other is 0. Seems really odd that it would do some of the actions, but not others. Also I have no other event where the counter is set, so it's not conflicting. And yes, I checked the event order, and create is before set.
Re: Easy way to display damage/point indicators?
any chance you cn upload the file??? albeit a stripped down one if you want to keep your game secret for now!
Re: Easy way to display damage/point indicators?
This is just my test file for throwing out a bunch of different ideas so I don't screw up my main game.
If you try it out, you can see that if you hit two enemies at once (press Z to enter attack mode) one number shows up as 10, the other as 0.
I tried to fix it by updating the counter, but if you level up while the damage indicator is still on-screen, it changes.
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=download&Number=2754
Re: Easy way to display damage/point indicators?