The Daily Click ::. Forums ::. Klik Coding Help ::. Is there an easier way?
 

Post Reply  Post Oekaki 
 

Posted By Message

-Dark Martin-

The dark is most certainly not your friend

Registered
  05/06/2008
Points
  21

Has Donated, Thank You!KlikCast StarSonic SpeedWii Owner360 Owner
15th August, 2008 at 12:18:26 -

In my project DR there will be monsters in the game and they will appear in multiple rooms of the game.

In that game say the player walks into a room, there are 4 monsters, he kills only 2 of em then leaves the room (Frame) then re-enters it, now of course logically there should still be only 2.

How i would do this is have a global array and each coordinate of the array will be dedicated to a room in the game that will have monsters in it, If a number are killed the array is saved and stored, and of course re-entering the room would mean 2 would still be there.

BUT what i want to know if there is an easier way?

If its complicated i am more than willing to learn.

 
<a href="http://s50.photobucket.com/albums/f315/Martin_Bodger/?action=view¤t=signature_stripcopy.png" target="_blank">Image

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
15th August, 2008 at 12:22:42 -

If your rooms are quite small, you could have them all on one frame and use some fancy scrolling so it looks as if it's multiple frames (a bit like zelda scrolling)

But if you want to save that information when you quit the game/leave the frame or you have large rooms that might be a problem.. I guess the array is a logical choice for this, I can't think of a better way right now.

 
n/a

-Dark Martin-

The dark is most certainly not your friend

Registered
  05/06/2008
Points
  21

Has Donated, Thank You!KlikCast StarSonic SpeedWii Owner360 Owner
15th August, 2008 at 12:24:03 -

Damn that was replied to fast.O_O

But yeah i want them to be there if he quits and then returns to the game.

 
<a href="http://s50.photobucket.com/albums/f315/Martin_Bodger/?action=view¤t=signature_stripcopy.png" target="_blank">Image

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
15th August, 2008 at 12:46:54 -

How can it be too fast? And efficient reply can never be too fast.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
15th August, 2008 at 13:03:38 -

array, ini, text, take your pic.

or do what klikmaster said.

that gave me an idea. mmf needs a global array.

 
n/a

-Dark Martin-

The dark is most certainly not your friend

Registered
  05/06/2008
Points
  21

Has Donated, Thank You!KlikCast StarSonic SpeedWii Owner360 Owner
15th August, 2008 at 13:34:41 -


Originally Posted by -Adam-
How can it be too fast? And efficient reply can never be too fast.



What, didn't see it was replied too fast, i said it was replied TO fast.

 
<a href="http://s50.photobucket.com/albums/f315/Martin_Bodger/?action=view¤t=signature_stripcopy.png" target="_blank">Image

Willy C



Registered
  14/02/2004
Points
  1524

Game of the Week WinnerKlikCast StarPicture Me This -Round8- Winner!VIP MemberWii OwnerIt's-a me, Mario!Hero of TimeThe Cake is a LiePS3 OwnerI am an April Fool
Batman!Teddy Bear
15th August, 2008 at 14:39:08 -

I would go with klikmaster's idea. Just use one big frame and add a zelda like scrolling mechanism. There is an easy way for making such a scroller. I think I have a code like that with 2 events or something laying around somewhere. I can find it if you want it.

I don't know how your game is structured, but this usually is the most logical choice.

 
http://www.robocaptain.com

-Dark Martin-

The dark is most certainly not your friend

Registered
  05/06/2008
Points
  21

Has Donated, Thank You!KlikCast StarSonic SpeedWii Owner360 Owner
15th August, 2008 at 15:10:13 -

Its not structured to support that zelda thing unfortunatly, i can't explain why though sorry.

 
<a href="http://s50.photobucket.com/albums/f315/Martin_Bodger/?action=view¤t=signature_stripcopy.png" target="_blank">Image

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
15th August, 2008 at 21:25:40 -


Originally Posted by Anti-Cecil

that gave me an idea. mmf needs a global array.



The array object has a nice "make global to entire application" property

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
15th August, 2008 at 21:54:48 -

This sort of thing confuses me.

Yeah, the one big frame idea sounds the easiest since you wont have to actually code anything to make it remember the baddies.

But you might want to add a few things to make sure they stop when you're elsewhere in the frame so you're not trying to have too much going on at once.

 
.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
15th August, 2008 at 22:12:48 -

oh well hell. just use an array and make it global. and store values for each enemy like "killed" or "alive" ya know? and on the start of the frame if its "alive" then create the appropriate enemy.

it might be a bit of extra work if you have a lot of enemies but its better if you cant restructure your engine for zelda like scrolling.

 
n/a

-Dark Martin-

The dark is most certainly not your friend

Registered
  05/06/2008
Points
  21

Has Donated, Thank You!KlikCast StarSonic SpeedWii Owner360 Owner
15th August, 2008 at 23:22:31 -

I like the array idea better.

And i think i know how to do it now.

Thanks everyone.

 
<a href="http://s50.photobucket.com/albums/f315/Martin_Bodger/?action=view¤t=signature_stripcopy.png" target="_blank">Image
   

Post Reply



 



Advertisement

Worth A Click