Attack bounds question

(Rusty246) #1

Hey :D.
Here is the file of a scene in a game I am making. There is a dagger on the table to the right. When you pick it up it adds a scene overlay of the dagger. So for it to be able to attack it needs attack bounds that will hurt the enemy. So when you left click a big white box will appear ( thats the attack bounds ). I need it so the attack bounds only appear once you have picked up the dagger. At the moment the attack bound appers even if you havent picked up the dagger.
Thanks for any help

Cheers :D.

0 Likes

(Stu_Flowers) #2

Create an integer property on the “add attack” object. Now, create a ‘property’ sensor that checks to see if that property is equal to 1, and hook that into the same controller as the left click sensor. Now, when you pick up the dagger, have it assign that property a value of 1.

If you want me to explain further, I can, but judging from the game so far, you should have no problem with that. Keep working!

~~Stu

0 Likes

(The Red Hand) #3

Another bug, When you hold down the mouse button, it keeps swinging regardless of the box…

Really good man. I admire your talent!

0 Likes

(Rusty246) #4

Cheers I got it to work :D.
edit : hmmm youve got a point red hand, how do I fix that?

0 Likes

(The Red Hand) #5

I made a similar version, but making it overly complex. Here it is, hope it helps.
EDIT: Controls: Press Space to start attacking, Cycle goes without constantly pressing space bar, press Enter for enemy to come near you (No opposing attack yet), and the numbers represent the amount of health enemy has.

0 Likes

(Rusty246) #6

Hey again.
Thanks red hand. Ive got a new question, Ive made a very simple outside and its got the attack bounds, if you click, it appers. but I only want it to apper once youve picked up the dagger inside, which is a different scene. How do I do this. Here is the file.
Thanks for the help.
Cheers :D.

0 Likes

(Rusty246) #7

Anyone know how to get the outside to work?
Cheers :eyebrowlift:.

0 Likes

(Rusty246) #8

Anyone at all? :eyebrowlift2:

0 Likes