System: Create Object not working???

For questions about using Classic.

Post » Sat Dec 10, 2011 7:28 pm

These events are working exactly like I would expect...





The System: Create Object event does not appear to be creating any objects. The event is triggering though, because it does change the DEBUG text.

Also if I use a Spawn Object at Object event, it works fine. But I want to spawn the Rocket sprite relative to x, y coordinates and not another sprite.

I can't figure out why it's not working like I would expect.Xyvir2011-12-10 19:32:01
B
2
G
1
Posts: 6
Reputation: 462

Post » Sat Dec 10, 2011 7:43 pm

First, I would suspect your condition aimdown overlaps enemy(negated) is the main issue. Inverted conditions are a bit picky on what will work, especially if your trying to use multiple instances.
Might try for each, or do a system distance()comparison.

Second, floor doesn't really help here as random wont return a decimal, unless you feed it one.newt2011-12-10 20:22:47
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Dec 10, 2011 7:51 pm

Yes, removing the inverse trigger worked. Thank you. I don't exactly understand why it was the problem, but I can write the event another way. Thank you.
B
2
G
1
Posts: 6
Reputation: 462

Post » Sat Dec 10, 2011 7:59 pm

I still used the inverse condition, just with 2 sub events instead of one.

In general though, is it better to use other positive conditions than negative ones?
B
2
G
1
Posts: 6
Reputation: 462

Post » Sat Dec 10, 2011 8:22 pm

Just have to test on an as per basis, but as a rule of thumb you might try to not use it unless you have to.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Dec 10, 2011 9:21 pm

Thank you so much for the help and info. It alleviated and avoided much frustration.
B
2
G
1
Posts: 6
Reputation: 462

Post » Sat Dec 10, 2011 9:39 pm

... On further review the problem is still persisting.

The System: Spawn Sprite is working in other places in the event editor.

The event is triggering, because other things I put in the same place as the System: Spawn is triggering.

It works if I use Spawn Object from another sprite instead of from System...

But it still isn't working, even when I removed the negative condition.Xyvir2011-12-10 21:40:22
B
2
G
1
Posts: 6
Reputation: 462

Post » Sat Dec 10, 2011 10:12 pm

Well if random(3)= 2 isn't exactly 50/50 chance wise.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Dec 10, 2011 10:36 pm

I know that too... that was intentional. Anyway, I got it to work. It had something to do with the layer name not being correct or something. I changed the layer name and changed it back and it works okay now for some reason... Anyway, yay. and thanks.
B
2
G
1
Posts: 6
Reputation: 462


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests