The Daily Click ::. Forums ::. Klik Coding Help ::. global objects
 

Post Reply  Post Oekaki 
 

Posted By Message

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
30th September, 2009 at 19:14:46 -

I recently made a lot of objects global... i noticed that only when i deleted the objects from other frames and replaced them with from whatever frame. Then only they became global in editor.

But now i have about 30 objects that i need to make global, they are in 4 frames already. And i have in each frame coded for each object = Create that object.

If I would delete them, and replace them i would loose the code, I mean i would have to copy paste but in some frames the code is very different.

So is there a way to make them global without having to delete replace them, and or without messing the code up?

 
Code me a sausage!

Solgryn

Solgryn dot org

Registered
  20/12/2008
Points
  12572

GOTW Winner!VIP MemberWii OwnerIt's-a me, Mario!The Cake is a LieGOTM 2ND PLACE! - APRIL 2009GOTM 2ND PLACE - JUNE 2009PS3 OwnerKlikCast #15 Compo Winner!LOL Sign
You've Been Circy'd!GOTM WINNER - JANUARY 2010I am an April FoolGOTW MARCH 2010 WINNER!Santa Hat
30th September, 2009 at 20:57:48 -

I guess you could give them all the same name as it's duplicate in the other frames? And then make them global

 
www.Solgryn.org

Image

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
30th September, 2009 at 22:02:58 -

They are already the same name, they are the same objects, it just they werent global before. I have tried just deleting and copying, but it doesnt do well, somehow it messes up everything.

 
Code me a sausage!

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
30th September, 2009 at 22:07:09 -

When you check "Global object" in a duplicated object's properties, you should get this message:

One or more local objects in this application have the same name and type has this object.
Do you want to make them global?

 
...

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
1st October, 2009 at 00:02:28 -

yes i know, but it doesnt make them global unless you replace those objects. If you know what i mean...

In two of the frames the graphic for those objects has been changed and maybe some minor things, and when i click yes to all the gfx should be changed to either newer or older. And it does not change. The objects still remain different on different frames. Only thing that changes on all is the global ticked yes.

And when i recopy the objects then my code gets messed up.

Edited by Don Luciano

 
Code me a sausage!

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
1st October, 2009 at 00:20:04 -

"Global" has nothing to do with animation, value names and other properties. It only means the object's alterable values and strings will be kept in memory when the application changes frame.

So, if you tick global in one, and they all get ticked, it worked.

 
...

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
1st October, 2009 at 14:31:24 -

Yeah, but they should be also global in editor, when i change in one frame a value or graphic it should change in all frames in the editor. Like normally created global objects do.

Just ticking it is not going to work because the game can start in a different frame, and i am mainly doing this so i can change values and stuff from any frame in editor.


Originally Posted by ::SPITZNAGL::
"Global" has nothing to do with animation, value names and other properties. It only means the object's alterable values and strings will be kept in memory when the application changes frame.

So, if you tick global in one, and they all get ticked, it worked.



Thats not correct. Normally created global objects are also global in editor aswell. Not just in game.

Nevermind anyways, i will recopy them and recode those parts.

Edited by Don Luciano

 
Code me a sausage!
   

Post Reply



 



Advertisement

Worth A Click