Page 2 of 4

Re: New hooks?

Posted: Tue Nov 04, 2014 12:50 pm
by JKos
+1 for onDrawGui

Not a hook, but would be nice if we could have an access to the default camera (eg. GameObject.getDefaultCamera()) If we set camera with GameMode.setCamera(camera), we can't return back to default camera anymore, so GameMode.setCamera() is pretty useless now. Or has someone found a way to restore default camera?

Re: New hooks?

Posted: Tue Nov 04, 2014 12:55 pm
by JohnWordsworth
@JKos: Have you tried GameMode.setCamera(nil)? Not tested (and at work at the moment), but that might work?

Re: New hooks?

Posted: Tue Nov 04, 2014 1:40 pm
by Jgwman
Maybe an onLoad hook for maps? Unless I missed one. Things like adding items to inventories must be done after the map loads, or so it seemed to me. I've had to do it so far with a suicidal timer.

Side question: can we still spawn things "in the air"? Passing nil to the location params on the spawn function didn't work.

Re: New hooks?

Posted: Tue Nov 04, 2014 2:39 pm
by swampie
Prozail wrote:
Also, an onDamage hook on the HealthComponent would be nice.
I second that :)

Re: New hooks?

Posted: Tue Nov 04, 2014 2:54 pm
by MrChoke
I second Prozail's suggestion. A hook to say when a teleporter is being used. Also, one for when an exit is being used.

Re: New hooks?

Posted: Tue Nov 04, 2014 3:00 pm
by petri
JKos wrote:Not a hook, but would be nice if we could have an access to the default camera (eg. GameObject.getDefaultCamera()) If we set camera with GameMode.setCamera(camera), we can't return back to default camera anymore, so GameMode.setCamera() is pretty useless now. Or has someone found a way to restore default camera?
setCamera(nil) should work.

Re: New hooks?

Posted: Tue Nov 04, 2014 3:01 pm
by msyblade
+1 for onDrawGui.

Re: New hooks?

Posted: Tue Nov 04, 2014 3:03 pm
by petri
Jgwman wrote:Side question: can we still spawn things "in the air"? Passing nil to the location params on the spawn function didn't work.
No, because that would cause subtle but hard to find garbage collection issues (because the spawned object is nowhere, it can be garbage collected). You can use someobj:spawn() to spawn in someobj's location.

Re: New hooks?

Posted: Tue Nov 04, 2014 3:44 pm
by NutJob
If you take a look at this video (Skuggasveinn's Tutorials) you'll see (at 31 seconds in) a lantern not against the wall. I'm guessing this was done so it would be flush with a pillar but it's not flush with a wall. Any chance we can get these pushed back some so they get put flush on a wall? The current work around is from Lark.

...oh, yes, removeConnector like everyone else is asking for though that would only save me a step or two; deactivate or disable actually works well enough and 2) some teleporter hooks and a dysfunctional onMapOpen hook that crashes the application would be nice (I don't want players to use their map). <-- yes, that's a joke, please don't reply-focus on that statement.

~cheers~
Thanks, Matt

Re: New hooks?

Posted: Tue Nov 04, 2014 4:03 pm
by petri
Ok, let's spare the rest of the ideas for the Glögg sessions. Making a new build now...