Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2011-08-02 04:49:10

Sambo
Member
Registered: 2010-11-04
Posts: 56

Suggestion: Object ID's

You give each entity of a certain object a different ID number that can control its interaction with another object. For example, button number 1 opens door number 1, button number 2 opens door number 2, and so on. This could also be used for Special Stage rings: You go into ring number 1 and when you come back from the Special Stage, ring #1 is disabled and does not appear again until a certain command is called by another object.

Offline

#2 2011-08-02 05:18:38

lunarrush
Member
Registered: 2010-05-13
Posts: 278

Re: Suggestion: Object ID's

Sambo wrote:

You give each entity of a certain object a different ID number that can control its interaction with another object. For example, button number 1 opens door number 1, button number 2 opens door number 2, and so on. This could also be used for Special Stage rings: You go into ring number 1 and when you come back from the Special Stage, ring #1 is disabled and does not appear again until a certain command is called by another object.

That's the wonderful thing about scripting, it's already entirely possible.  I do agree that it would be nice to assign unique id numbers to individual objects created from the same object code.  That would prevent a lot of busy work that occurs when you have to create a unique object for each time you have to have this level of interaction.  It would also help reduce the size of the library of scripts that you would need to create a full game.
+1 vote from me.


If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Offline

#3 2011-08-02 05:33:21

SilverstepP
Member
From: North Carolina
Registered: 2009-07-31
Posts: 1,545

Re: Suggestion: Object ID's

lunarrush wrote:
Sambo wrote:

You give each entity of a certain object a different ID number that can control its interaction with another object. For example, button number 1 opens door number 1, button number 2 opens door number 2, and so on. This could also be used for Special Stage rings: You go into ring number 1 and when you come back from the Special Stage, ring #1 is disabled and does not appear again until a certain command is called by another object.

That's the wonderful thing about scripting, it's already entirely possible.  I do agree that it would be nice to assign unique id numbers to individual objects created from the same object code.  That would prevent a lot of busy work that occurs when you have to create a unique object for each time you have to have this level of interaction.  It would also help reduce the size of the library of scripts that you would need to create a full game.
+1 vote from me.

I think that's naming the object children with create_child....

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org