[Suggestion] Update to pin object

Discussion and feedback on Construct 2

Post » Wed Apr 30, 2014 3:26 pm

What Ashley mentions is that the behaviours become more noticeable with 2 pins. But there is pin lag and it's in C2 architecture. But by all means if you feel it's a bug. Fill one out.

The order as I think I understand it is
EventSheet
Engine

I don't think its a bug, that's why I added it as a suggestion here. But I see what you mean and think you are correct that its because the Pinned objects is not actually moved before all other actions are done. So guess its not possible unless that got changed and doubt that its going to happen :D
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Wed Apr 30, 2014 5:47 pm

@nimos100 just tell the game to wait 1*dt seconds or 0.016 seconds, both are just 1 (ONE) tick worth of waiting. Don't know any human on this planet that can be bothered of having to wait 1/60 of a second for something. do you? xD
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Wed Apr 30, 2014 7:04 pm

Sargas wrote:@nimos100 just tell the game to wait 1*dt seconds or 0.016 seconds, both are just 1 (ONE) tick worth of waiting. Don't know any human on this planet that can be bothered of having to wait 1/60 of a second for something. do you? xD

Yes me :P

Just kidding :), I agree the problem is not really the wait in it self even if you use a wait of 0.1 its equal to 6 ticks if im not mistaken, so its hardly noticeable, so its not really a problem. The problem is that wait in it self even If it only have a duration of 1 tick can cause problems that can screw up things.

Here is an example:
Repeat 10 times
------- Call function("Spawn enemy")

Function Spawn enemy
Create enemy()
Call function ("initialize enemy")

Function Initialize enemy
Call function ("Create enemy weapon")

Function Create enemy weapon
Create Enemy_weapon

Then suddenly things starts to go wrong as I see it.

Because now there are actually two objects that doesn't exist yet, The Enemy and the Weapon that you want it to use. So if you throw in a Wait different places to solve it, It might work. However at the very start we are actually repeating this 10 times, to create 10 enemies which will then create 10 different weapons, so suddenly you might have 20 objects that actually doesn't exist, and then it seems to go wrong. Whether that's completely true im not 100% sure about, but it seems that a function doesn't count as a top level, which I find to be logic if its the case, but I haven't seen anything saying that it ain't which is why im not certain.


I solved this by implementing an object handler which I use every time you would otherwise use a wait. This completely replaces the need for using waits, except for this problem with behaviours because it runs after all "Events" so in that case it cant solve it. But since I didn't knew that was how C2 handles behaviours, I thought my object handler could just fix it as well, but now that I know how C2 handles behaviours it makes perfect sense that it doesn't work with them. But since I made a work around for that as well, I can or should just be able to do that if I have problems with behaviours again, but I haven't actually had any problems with them except for the pin one, so doubt it will be a huge problem.
Image
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Euduardo and 13 guests