Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help My collide functions doesn't work properly
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
My collide functions doesn't work properly

So, as I watch one of my beta testers play through my mod, he sometimes gotta restart here and there thanks to bugs (but are passable). Now, what I notice is that the collide functions aint responding correctly after an autosave. He clicks Continue and got to the last autosave and they refuse to work now. All the important stuff that is necessary for the level to function correctly has been disabled for some reason.

Why is this happening? It has become a big problem for my recent maps and I have to fix this somehow. If not, my mod is gonna be a big mess.

Derp.
(This post was last modified: 04-24-2014, 09:55 PM by Neelke.)
04-24-2014, 09:53 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: My collide functions doesn't work properly

I have actually encountered this myself and I'm still curious as to what is causing it...

04-24-2014, 10:29 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: My collide functions doesn't work properly

Try setting the Collide callbacks to this:

AddEntityCollideCallback("Thing", "Thing2", "Event", false, 1);

This true/false determines if the callback is erased when the callback is called. I dunno what's with the checkpoint, but this might fix it.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
04-24-2014, 10:38 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: My collide functions doesn't work properly

No, it's not that it's removed after use, but the fact that it simply disappears before even executed. Something with autosaves. Could it be a bug?

04-24-2014, 11:13 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: My collide functions doesn't work properly

OnStart() vs OnEnter()?

Edit:

Does having your collides in OnStart() differ from having them in OnEnter()?

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-24-2014, 11:58 PM by Romulator.)
04-24-2014, 11:58 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#6
RE: My collide functions doesn't work properly

Hmmm.. never encountered anything like this before.
On Premonition i have an autosave on the start of every map....
ALL my scripts functions are on OnStart()
and all my AUTOSAVES are OnEnter()
(This post was last modified: 04-25-2014, 01:42 PM by DnALANGE.)
04-25-2014, 01:38 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#7
RE: My collide functions doesn't work properly

Some of the collide functions are in Onstart and some are in OnEnter. Still the same thing. It's so weird. But like Mudbill says, I'm expecting a bug.

Derp.
04-25-2014, 02:25 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: My collide functions doesn't work properly

Perhaps it has something to do with when the autosave occurs. Perhaps it conflicts with something, causing it to not save the whole file.

What seems to be happening is that when starting a map, you have all the callbacks in OnStart. Later, back in the menu after saving and exiting, you load a previous autosave from that map. Once loaded, the callbacks that had already been added when the save was made no longer apply to the objects in the level, causing a major halt in the middle of the story (because these callbacks are often essential to progress). I don't think this happens every time, but I have indeed seen it happen in a video for one of my projects. It's kinda sad, because the player will blame the author of the story for it (as that would be the more likely cause than a fault in the game itself).

04-25-2014, 03:54 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#9
RE: My collide functions doesn't work properly

(04-25-2014, 03:54 PM)Mudbill Wrote: Perhaps it has something to do with when the autosave occurs. Perhaps it conflicts with something, causing it to not save the whole file.

What seems to be happening is that when starting a map, you have all the callbacks in OnStart. Later, back in the menu after saving and exiting, you load a previous autosave from that map. Once loaded, the callbacks that had already been added when the save was made no longer apply to the objects in the level, causing a major halt in the middle of the story (because these callbacks are often essential to progress). I don't think this happens every time, but I have indeed seen it happen in a video for one of my projects. It's kinda sad, because the player will blame the author of the story for it (as that would be the more likely cause than a fault in the game itself).

[Image: cristiano-ronaldo-jews.gif]

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-25-2014, 03:57 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#10
RE: My collide functions doesn't work properly

(04-25-2014, 03:54 PM)Mudbill Wrote: Perhaps it has something to do with when the autosave occurs. Perhaps it conflicts with something, causing it to not save the whole file.

What seems to be happening is that when starting a map, you have all the callbacks in OnStart. Later, back in the menu after saving and exiting, you load a previous autosave from that map. Once loaded, the callbacks that had already been added when the save was made no longer apply to the objects in the level, causing a major halt in the middle of the story (because these callbacks are often essential to progress). I don't think this happens every time, but I have indeed seen it happen in a video for one of my projects. It's kinda sad, because the player will blame the author of the story for it (as that would be the more likely cause than a fault in the game itself).

I guess so. For now I guess I have to deal with it. Until I (or we) can find a way to fix this thing, I have to keep working on the mod I guess.

Derp.
04-25-2014, 04:02 PM
Find




Users browsing this thread: 1 Guest(s)