r113 - Function not being called

Bugs will be moved here once resolved.

Post » Tue Dec 18, 2012 9:14 pm

Bugs only occour in complex projects ^^, and are not rebuildable when trying to reproduce in a new capx...this seems to be an often case here.

But maybe you can help me. Please check when the AI straight wanders through the right AIMovementBorder, not calling the function to change walking direction...which works fine before.

The affected event / call is in the sheet "AI_mgmt".

https://dl.dropbox.com/u/54216429/Terminator.capx

So the problem is that the only instance of "enemy" gets a UID 55+ after its variables has been changed in a function before.

I can't find an error in the buildup, so i guess this is a bug in the UID -> Function Combo.xeed2012-12-19 18:47:56
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Dec 19, 2012 4:38 pm

well, i need to bump this...why does the only one enemy get the UID 56 in this project?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Dec 19, 2012 5:36 pm

You bumped this after 20 hours. Sometimes it can take us a couple of weeks before we get round to bug reports since we're very busy. Please be patient!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Dec 19, 2012 6:03 pm

Also, read these tutorials may help:

http://www.scirra.com/tutorials/361/understanding-uid-iid-health-cards-and-rocket-smoke-trail

http://www.scirra.com/tutorials/355/making-character-composed-of-multiple-parts

It maybe a bug, but you need to believe, using UID or IID is not a big deal, specially because what you discovered was cited on these tutorials as a knew issue (and I suggested this read about 2 times for you on this forum, take a time and read tutorials, not only these, on the tutorial section have many good and helpful tutorials.)
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,211
Reputation: 18,473

Post » Wed Dec 19, 2012 6:38 pm

Thanks for your answers.

@Asley: i bumped because this could be a base bug in the uid system, which 'could' have priority. and if so, i can not continue my (simple) project because this old uid object instancing feature. (so glad c2 currently works on my laptop, and got some time ^^ )

Should i wait for feedback before continue working (and trying to fix) on the project?

PS: I think a status indicator would be useful for any bug-report, to get feedback about its relevance, and if you are working on it. Some people are using c2 in a productive environment, and dont have weeks time for eventually getting an answer

@telle: i've been reading this stuff long ago, if i could understand why the uid's does not work in this project, i would not have had posted Please download the capx, and try yourself.xeed2012-12-19 18:54:57
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Dec 19, 2012 6:57 pm

It's not a problem with UID, it's your events. Two things. When movementDirection = 2 then event 8 changes it to 1 and then event 9 changes it back to 2. So the enemy will turn right but never left. You need an else in there.

The other problem is in event 6. When the enemy is overlapping the object or standing next to a wall the change direction function gets called repeatedly. Every tick you'll be switching directions until you move away. So you need a trigger once in there.

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Dec 19, 2012 7:10 pm

both point makes sense, thanks.

For event 9, how can i leave the function instead of adding the else condition?

and for event 6, i guess a "wait" action should fix this too, right?

at least, do you know why the enemy UID kicks up this way?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Dec 19, 2012 7:46 pm

[QUOTE=xeed] both point makes sense, thanks.

For event 9, how can i leave the function instead of adding the else condition?
[/quote]
Don't think you can.
[quote]
and for event 6, i guess a "wait" action should fix this too, right?
[/quote]
Nope with wait you'd just be queueing up many function calls to happen after x seconds because the event is still going to run every tick.
[quote]
at least, do you know why the enemy UID kicks up this way?[/QUOTE]
Not sure what you mean about the enemy UID. Every object has a different UID, every sprite, text object, etc. You have 55+ objects in your layout so it's not surprising that the enemy UID could be 55 or 56.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Dec 19, 2012 9:21 pm

And deleting (or creating) an object will change the whole UID order too.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,211
Reputation: 18,473

Post » Thu Dec 20, 2012 11:48 am

@TELLES0808 - that's only true with IIDs, not UIDs. UIDs are guaranteed to be unique and stay the same for the lifetime of an object.

Closing as not a bug.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests