How do I properly set bullet direction (for a portal gun!)

Get help using Construct 2

Post » Sat Aug 02, 2014 10:20 am

if I may ask, why use an int rather than a boolean for isfiring? Booleans seem like a more natural fit for something like this.

EDIT:
Oh boy, I hope I'm not turning into a help vampire. I see I can destroy my bullets easily once they're outside the layout, what if I want them to be destroyed the moment they're offscreen?

EDIT 2:
Found it! But is the everytick, isonscreen efficient? I am inclined to minimize the everytick stuff.
B
5
Posts: 15
Reputation: 235

Post » Sat Aug 02, 2014 11:10 am

isonscreen is being checked everytick as it is, no need to add another condition.

about the isFiring, you can use a boolean, it will work the same.
i usually like to use vars, the later if i want to add another state of the condition i can use other numbers.
for example you can set it to -1 to disable firing, or to 2 for another state of firing etc.
Image
B
78
S
28
G
12
Posts: 515
Reputation: 12,459

Post » Sat Aug 02, 2014 1:48 pm

That makes a lot of sense. I think that wraps up this thread nicely, thanks again for all the help
B
5
Posts: 15
Reputation: 235

Previous

Return to How do I....?

Who is online

Users browsing this forum: vutankhoa2015 and 31 guests