Stumped, my code is not working

For questions about using Classic.

Post » Fri Feb 05, 2010 3:55 am

Hey, my code:

[code:dhg7hmua]Ship.Value('Health')<0

(Sub Event) Objects.Value('Target:UID')=Ship.UID

then: Object.Value('Target:UID')=0[/code:dhg7hmua]

("Objects" is a family that "Ship" belongs to)

But, this never sets Objects Target:UID to 0

I've tried and tried an I can't get this to work.

What am I doing wrong?
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Fri Feb 05, 2010 6:08 am

Does the ship health ever drop below 0? because if not the event wont run. I would put a message box event in their to see where the event is failing....
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Fri Feb 05, 2010 6:46 am

It's hard to tell what's going on just from that event. It could be that your ship never goes below 0 as Aeal said, or there could be another event interfering with things afterward.

It's always a good idea to post your .cap. If you don't want your .cap posted in public you might be able to get someone in chat to help out by taking a look at it.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest