[Solved] Probably a noob question

For questions about using Classic.

Post » Fri Sep 04, 2009 1:38 am

Hey guys,
First I'd like to thank the community for having such a great forum. Many questions I had were answered with a simple search. However, something has come up to which I can't find the solution. It's probably some noob mistake, but I just can't get this to work! It goes like this:
I have a little maze with spawning objects which randomly creates an enemy when the layout is loaded. This enemy has LOS and Bullet behavior; their invisible and immobile until the player enters their LOS. The event goes:
"Enemy" has LOS to "Player" - "Enemy" activate bullet behavior (it's deactivated at the start of layout)
To simplify things, I've set the enemy to always face the player, since their invisible until coming into LOS:
Always - "Enemy" set angle towards "Player"
For testing I set the Enemy to be visible from start. However, everytime the player comes into the enemie's LOS, all instances of Enemy move, even the ones without LOS. LOS is set to 1px precision, and 100px range. Bullet to 25px speed, never destroy.
What's wrong here? How do I get only the instance in LOS to have bullet behavior activated?
If needed, I'll post the cap.
Thanks in advance
Pedro
B
1
G
3
Posts: 7
Reputation: 839

Post » Fri Sep 04, 2009 3:43 am

What you are doing sounds right, so it might help if you posted a simple .cap showing the problem. It sounds like somehow you are picking the group instead of the individual object. Maybe someone better than I can solve this without the .cap
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Sep 05, 2009 2:40 am

Well, I managed to solve the question by removing the bullet behavior action and replacing it was a PV:
Has LOS - Set PV to 1
If PV=1 - Activate Bullet Behavior

the work around worked nicely, but I'd still like to know why the first way didn't work, if anyone knows.
B
1
G
3
Posts: 7
Reputation: 839


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests