Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   onPlayertouchsLink() (https://forums.graalonline.com/forums/showthread.php?t=134256942)

DustyPorViva 11-16-2009 08:14 PM

onPlayertouchsLink()
 
onPlayertouchsLink(id) {}

A function that is called when a player touches a link, and is processed before the player is warped out of the level. id = the id of the link itself, so we can access the info like the destination level and such. Why? To make links a bit more workable with custom systems perhaps, or to maybe add screen effects when the player exits a level, for example. And maybe the ability to cancel the link's effect?

fowlplay4 11-16-2009 09:45 PM

Would like this.

DustyPorViva 11-16-2009 09:53 PM

I'd actually like a lot more ability to work with the default level data. Right now, for example, there is no way to disable default signs and no way to access the data clientside. That means in order to make a custom sign system you'd have to script the actual signs themselves(and why change a function many are familiar with?). I want to be able to make custom systems that work backwards compatible with the default systems for developers, but Graal doesn't make it easy.

Tigairius 11-16-2009 11:21 PM

Great suggestion, I agree. Would be nice to also disable default linking somehow.

Chompy 11-16-2009 11:25 PM

I totally agree that this suggestion would be an useful addition, always wanted an easier way to trigger screen effects on exiting a level

Loriel 11-16-2009 11:28 PM

Quote:

Originally Posted by Tigairius (Post 1538596)
Great suggestion, I agree. Would be nice to also disable default linking somehow.

return false from onPlayerTouchesLink(...) to prevent the player from being warped by the engine?

DustyPorViva 11-17-2009 12:00 AM

Quote:

Originally Posted by Tigairius (Post 1538596)
Great suggestion, I agree. Would be nice to also disable default linking somehow.

I like Loriel's idea, though I wouldn't object to serveroptions to disable default functions like links/signs/baddies and such when a server has no intention of using any of them.

Crono 11-17-2009 12:00 AM

Nice idea, probably won't be implemented for another 3+ years.

coreys 11-17-2009 12:01 AM

Quote:

Originally Posted by Loriel (Post 1538599)
return false from onPlayerTouchesLink(...) to prevent the player from being warped by the engine?

That would work great if Graal events didn't work the way they do. You could have multiple instances of onPlayerTouchesLink being called at the same time that could potentially return different values.

DustyPorViva 11-17-2009 12:02 AM

Quote:

Originally Posted by coreys (Post 1538604)
That would work great if Graal events didn't work the way they do. You could have multiple instances of onPlayerTouchesLink being called at the same time that could potentially return different values.

Well Stefan could probably only let a single NPC use it, like Control-NPC or something.

Loriel 11-17-2009 12:25 AM

Quote:

Originally Posted by coreys (Post 1538604)
That would work great if Graal events didn't work the way they do. You could have multiple instances of onPlayerTouchesLink being called at the same time that could potentially return different values.

I was assuming it would be an event delivered to all weapons, clientside, and it defaulted to true.

coreys 11-17-2009 02:43 AM

Quote:

Originally Posted by DustyPorViva (Post 1538605)
Well Stefan could probably only let a single NPC use it, like Control-NPC or something.

Would be better for him to just add to it to enablefeatures or something around those lines.


All times are GMT +2. The time now is 11:00 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.