creating a combo system (simple question)
okay so this may be simple question... acutally im pretty sure it will be super simple...
so, i have a game attribute called game.combosystem...
everytime you hit an enemy the combo system goes up one and if it is equal or greater than 5 it becomes visible (because the actor is invisible just on the scene) then after that one second after there is not a combo i want the combo system to go back to 0...
i thought these were the rules i was supposed to use just to give you guys an example of what im saying...
if attribute game.combosystem is equal or greater than 5
change attribute self.color.alpha to 1
display text game.combosystem
otherwise change attribute self.color.alpha to 0
NOW HERES THE PROBLEM...
if game combo.system is equal or greater than 5
after 1 second... run to completion
change attribute game.combo.system to 0
i know thats where the error in coding is at but i dont know how to fix it at all
Comments
Those rules will make the actor visible and display the text for one second. If it's not working, there must be more to this than you provided (e.g. other attributes/rule conditions).
You might want to upload a simplified project file with just that code or provide a screenshot of the rules so that nothing is missing.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
yeah thats exactly what i had set in my rules... but what im trying to do is that for each combo you have it resets that number back to one... lets say the combo is going from 8 till 9 and from 9 till 10 each time i want the number to start over so it can display for a while and disappear @tatiang just like a regular fighting game
You've not said what the problem is, you've listed your rules and said 'now here's the problem' and 'i dont know how to fix it at all' . . . and so on . . . but you've not actually said what the problem is ?
The score is reset to -8 ? The score doesn't reset at all ? The score doesn't show up ? The alpha value doesn't change ? The timer doesn't fire ? . . . . (etc etc).
. . . also I'm not sure why you have two rules looking for the same condition to fire ?
Could you not put all the rules in one place (and dump the switching on and off of the alpha channel too) . . . like this:
When combosystem > 4
Timer / For 1
--Display combosystem
Timer / After 1
--Change combosystem to 0
Sorry, I'm having a hard time following you. What do you want to happen when the combo value goes from 8 to 9? And then what do you want to happen when the combo value goes from 9 to 10?
Are you saying that whenever you increase the combo value, you want it to display something for one second and then reset the value back to 1? If so, that sounds like the rules you already have except that you said first that you wanted to reset it to 0.
You might want to sketch out your idea and post it here. I think that might give us a better sense of what you're trying to do.
*Don't ask @Socks to draw because he always draws the same spider...
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Not so, I don't seem to remember Tony the Spider ever having the top half of Debbie Gibson's hair style before ? This is an entirely new look for Tony.
hahahahahahahahahahahahaha!!!! basically i want the combo to show for a second before resetting the combo number back to zero... as long as the attack hits the enemy within that one second window so people can see how much their combo was as long as they are hitting something
i cant figure out how to post a video on here smh
http://tinypic.com/r/21bt3y0/9
id prefer a video on here but eh... thats as good as i can do it
Timer / For 1 second
--Display combo
Timer / After 1 second
--Change combo to 0
I don't really know what that means ?
ugh... i wish i were better at explaining things...
everytime a number changes it turns another attribute to 1 and when the attribute is one it counts down one second to disappear
like this
1,1
2,1
3,1
4,1
5,1
and every time that number is one it will count down to it will count down to 0 after 1 second
I assume you already have a rule that increases the first number (1... 2... 3... 4... 5...). In that rule, spawn an actor to display the 1 or whatever you need shown on the screen. In the actor that is being spawned, have a timer set to After 1 second, Destroy actor. If you need to change the combo attribute back to 0 before destroying the actor, you can.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's a demo: download
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Its nice he doesn't fight back. He just stands there and takes a beating, so we can learn...
I wouldn't bother with puzzle games, just upload a bunch of your forum questions to the AppStore as an app.
HAHAHHAHAHAHAHAHHAHAHAHAHAHAHHAHAHAHAHHA!!!!!!! @Socks youre so crazy!!!! lol but okay @tatiang i wonder if i can explain it better... WAIT LIKE KILLER INSTINCT! where the combo number will continue to go up and then if you dont hit the character within a certain amount of time then the combo count goes back to 0
@Socks LOL
@digitalzero Awesome! Sounds just like what I demo'ed here: http://forums.gamesalad.com/discussion/comment/588207/#Comment_588207.
sigh
Shall we try again?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang hey i guess it does! what threw me off was the interpolate on the color and the random positions it was going... yeah... thats actually it! lol!!!