[how do i] bullet behaviour

Get help using Construct 2

Post » Sat May 04, 2013 2:06 pm

why my bullet does not work ???? and why my text does not shown ???



this the file ...
https://www.dropbox.com/s/73hqs1cl8s8035j/my%20grandpa.capxbhentz2013-05-04 14:24:54
B
12
S
2
G
2
Posts: 54
Reputation: 2,144

Post » Sat May 04, 2013 2:13 pm

404 errorsite
B
18
S
6
G
3
Posts: 197
Reputation: 4,129

Post » Sat May 04, 2013 2:21 pm

retry please ... i have upload again
B
12
S
2
G
2
Posts: 54
Reputation: 2,144

Post » Sat May 04, 2013 2:25 pm

https://www.dropbox.com/s/73hqs1cl8s8035j/my%20grandpa.capx
B
12
S
2
G
2
Posts: 54
Reputation: 2,144

Post » Sat May 04, 2013 5:32 pm

It's usually a good idea to be as descriptive as possible, both in your request and in your actual project. Took me a while to figure out what your "bullet" was meant to be. You really should label your objects. What text object isn't working?

I don't understand the logic of your game. Is it a shooting gallery type game? Surely then the bullet itself would destroy the enemy object, but instead you've set the enemy to be destroyed when the player clicks on it, which doesn't make sense.

Also, you're setting the position of the bullet to the pistol every tick and when timer = 60. I don't understand what that timer is actually meant to do. You're using every tick actions all over the place which don't make sense.

Come to think of it, I don't understand what your entire game is meant to do. Not to sound mean but it really is quite a mess.
B
56
S
15
G
10
Posts: 910
Reputation: 11,952

Post » Sat May 04, 2013 7:00 pm

yaps ,. i have not give a description .. i am sorry .. player must touch / click the enemies that hide behind a tree .. if player does not touch it more than 10 enemies in 1 minutes .. the boss will shoot my grandpa ... my bullet does not work when player does not click it more than 10 .

also in my game star layout ... i create some text info that will inform us if we are win or not .. my text does not work when i win .. and not shown how many star i get ... ??? maybe this help to understand ...
i am really sorry for my bad english .... @GeometriX
B
12
S
2
G
2
Posts: 54
Reputation: 2,144

Post » Sat May 04, 2013 9:04 pm

Bad English isn't a big issue; I think many of us here have become accustomed to trying to figure out what people mean :P

Thanks, that explanation helped clear up a lot of things. I totally had your gameplay mechanisms down wrong.

So, here's an updated capx with everything working. I changed a number of things, which I commented, to improve the workflow and the win/lose events especially. I hope my changes will make sense - they're fairly simple - but please let me know if they need any more explaining. I suggest you open your project and my updated version side-by-side and go through the changes.

Oh, and the star rewards screen is obviously untouched. I assume you're still working on that, but it probably doesn't need to include the main event sheet, which is causing it to spawn enemies there as well.
B
56
S
15
G
10
Posts: 910
Reputation: 11,952

Post » Sat May 04, 2013 9:14 pm

thanks very much ... this really help me .. but my construct 2 still in stable version .. i must to download it now ..

B
12
S
2
G
2
Posts: 54
Reputation: 2,144

Post » Sat May 04, 2013 10:25 pm

i was wrong on using "every tick" .. what is function of it ???
what a different between "is touching" and "on touched" .. also what system trigger once means ????

B
12
S
2
G
2
Posts: 54
Reputation: 2,144

Post » Sat May 04, 2013 10:46 pm

All of your questions are related, actually.

Consider that there are two types of event conditions: triggered events and continuous events.

Triggered events, identified by the little green arrow symbol next to them, like "on touched", happen once. As soon as the player touches the object, the actions are taken once.

Continuous events monitor the conditions all the time (every tick, technically) to see if they are being met, and if they are, the actions take place all the time as well.

Here's an example of the difference between the two:

Say I have a monster, and I want to do damage to that monster every time I tap on it with the touch screen. Let's call it 50 damage. On touched object, I'd subtract 50 from its hit points. But that would require the player to tap many times, each time they do so, 50HP would be deducted. If I wanted the player to have access to a weaker continuous attack, I'd use the Is touching object action, and would perhaps deduct 5 hit points continuously (every tick) while that's happening.

To answer your question, you would typically use every tick as its own action. Like, every tick -> set text to Monster.HitPoints.

Trigger once is a special kind of event condition. It's a way of turning a continuous action into a triggered one - one that only activates a single time while true. You use this when you need to continuously check for something, but only want its action to take place a single time.
B
56
S
15
G
10
Posts: 910
Reputation: 11,952

Next

Return to How do I....?

Who is online

Users browsing this forum: chcteacher, Televangelist and 24 guests