Few noob questions involving Text and "Guns"

Get help using Construct 2

Post » Sun May 17, 2015 6:19 am

Hi guys

I need some help here.

Q1.
I got a gun that when left mouse is clicked on the game will spawn a target cursor and the gun will spawn a bullet object to that cursor.

Image

When I first clicked the 1st 3 times or more, it will shoot 3 projectiles then reload for 3 secs. But after that i can click/shoot up to 10 times before the reload kicks in. Im totally slumped. Any clue how to fix it ?

Q2
Set Text "You have lost Health" &Damage. How do i make it so that I can also set text behind the "&Damage" ? "You have lost " &Damage "Health" doesnt seems to work ! Im lost ...

Q3
I used the in game shop tutorial to create my upgrade shop. But I dont know how to set text for when the player has not enough cash. Any advice?

Please advice this noob! Thanks guys !
B
7
Posts: 30
Reputation: 333

Post » Sun May 17, 2015 12:18 pm

Q1 : it is a bad idea to use "wait", if you click again while your magazine is empty and the gun is reloading, the actions will be executed as much time as you click.

Set a variable named "reloadTimeLeft" to the number of seconds your gun needs to reload. Then subtract "dt" from it every frame. Don't allow the gun to shoot while this variable is greater than zero.

Q2 : you obviously have a problem with the way Construct 2 performs string concatenation, see the manual entry for strings, also, I believe there's a tutorial on advanced expressions that talks about it.

Q3 : IMHO leave the shop for later when you get a bit more experienced, try to tackle the basics first.
ImageImage
B
42
S
13
G
10
Posts: 164
Reputation: 7,625



Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests