GameSalad Heads are awesome!
Hi,
I'm new to this, but I've been around computers and the web for a LONG time, and I just wanted to say that I am really impressed with the whole GameSalad community. Its very impressive to see how people around here are willing to help others.
Keep up the good work everyone.
With that said maybe someone can help me with a couple of problems.
The first is, I am making a FPS shooter game and for the actor to die it has to get shot twice. I know how to kill the actor on the first shot but I want two shots to kill. I've tried all kinds of things and cannot figure out how to do this. Is there anyone out there that can help?
The second is, where can I learn all about attributes and behaviors? I mean EVERYTHING. I'd even be willing to pay something.
Thanks very much!!
I'm new to this, but I've been around computers and the web for a LONG time, and I just wanted to say that I am really impressed with the whole GameSalad community. Its very impressive to see how people around here are willing to help others.
Keep up the good work everyone.
With that said maybe someone can help me with a couple of problems.
The first is, I am making a FPS shooter game and for the actor to die it has to get shot twice. I know how to kill the actor on the first shot but I want two shots to kill. I've tried all kinds of things and cannot figure out how to do this. Is there anyone out there that can help?
The second is, where can I learn all about attributes and behaviors? I mean EVERYTHING. I'd even be willing to pay something.
Thanks very much!!
Comments
welcome to the community. Check out the cookbook and all the tutorials on youtube.
In the actor make an self attribute called "Shots". Set this one to 2. THen, when overlaps with bullet -> change self.Shots to self.Shots -1..
Make a new rule: When self.Shots = 0, destroy actor.
Alex
Thanks a lot for helping me out with this!
I am going through the cookbook now and learning lots of stuff.
Thanks again!
Bob
Also if you get stuck this forum is very active and helpful.
Darren
My game is actually a cannon game where the player is on the deck of a ship standing behind a cannon. Boats are sailing in front of the cannon on the horizon from right to left. You fire the cannon and hit the boat. Pretty basic.
Using the hit twice method works if the boat is in front of the cannon when its first fired and is still there when the ball comes back down (that being the second hit).
But in the case of firing the ball just before the boat is in front of the cannon and the ball coming down and touching the boat (registering the first hit) this would not work.
Since the ball is normal size when it leaves the cannon and gets smaller as it moves away from the boat, I guess what I need to do is somehow make the hit active after the ball has shrunk to a certain size.
Can anyone help me with this?
Thanks again everyone!
A quick and dirty way to do it is have a global attribute called 'LIVE' (for live round if you will!).
When the fire button is pressed, make LIVE = 0
When the ball is over a certain height, make LIVE =1
In the ship actor, if the ship collides with the ball and LIVE =1 then register a hit and make LIVE = 0.
This should make a nice cycle of setting LIVE to 0 when you press fire, and the hit only registering once the ball is over a certain height.
Alternatively, you can unlock the ball actor so you can access its self.size attributes from another actor.
In your ship you'd look for 'if attribute scene>level>ball>Width/length is equal or smaller than a certain number, and the ship collides with the ball, then register a hit.
You can't access other actor's self attributes from a separate actor normally, so this is the way to go.
Hope that makes sense, and good luck!
QS
:
DDr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I'll give it a go later and see if I can get it to work.
I think a lot of people get bogged down in technicalities, whereas I like to see developing games as more 'smoke and mirrors'.
A friend once made a sunrise/sunset demo and a programmer said 'How did you work out all the math for that?'.
The response?
"I didn't. I just interpolated the X and Y positions"
I think as long as the illusion is convincing, you can get around most problems with a little lateral thinking!
Anyway, good luck!
QS
:
DDr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
@finalcutbob - Game looks cool...
Quantumsheep, are these attributes boolean or real? Or does it matter?
But if you're pretty sure you just need 2 states, use a boolean
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Good luck!
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io