addTileTrigger at runtime

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

addTileTrigger at runtime

Post by ffourcad »

Hello, I see that in the final release, you've added the possibility to add trigger to inventory item. And that's great, I'm very glad you added this, thank you.
I was wondering if it was possible to add trigger to tiles on the map at runtime, even if it wasn't designed in the editor.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

You can add triggers to items being dragged and dropped on the map by the user, not to existing map items that have been placed on the map using the Editor.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Post by ffourcad »

By the same way that we can add triggers to tile at editing time, aren't there any "shortcuts" to achieve this with already existing tile ?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

No shortcuts, sorry... by the way, can you better explain why you need to do this? Why don't you add in the Editor?
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Post by ffourcad »

Simply because I have a random trap generator in my game, and the tiles that have traps are not always the same (at least, I wish that). So I'd like to add the triggers when the random traps have been calculated.
Nepaleno
Posts: 22
Joined: 06 May 2010, 06:28

Post by Nepaleno »

Is there any way to remove trigger from tile at runtime?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Nepaleno wrote:Is there any way to remove trigger from tile at runtime?
No, you can't. Simply ignore the triggered event in your code.
Paolo Bax
The SmartFoxServer Team
Post Reply