Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sprites: Panels/Entities #226510
09/10/08 04:35
09/10/08 04:35
Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
openfire2691 Offline OP
Junior Member
openfire2691  Offline OP
Junior Member

Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
I know this is probably a really simple question with a simple answer, but I have looked for hours and hours and not found anything that can help me. Here's the problem:

I'm making a 2D game which will present each character and enemy as a different sprite. So far, everything has been represented in a panel (player, background, menus, etc). The problem is, I want to have way more than one enemy on screen at a time. The only way I know how to do this is to write out a new panel definition for each enemy and make my script unbearably complex.

Is there some kind of way to create a sprite entity, of which I can just create more instances instead of having to code each individual enemy? Kind of an enemy "class", for a more java-like explanation.


When your script isn't working right, usually it's because it's doing exactly what you told it to. -An Unknown Programmer
Re: Sprites: Panels/Entities [Re: openfire2691] #226557
09/10/08 10:23
09/10/08 10:23
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
Use:

pan_create("yourpic.pcx",1);

First is the pic the second value the layer. Look up the manual also!

Re: Sprites: Panels/Entities [Re: Rasch] #226607
09/10/08 15:10
09/10/08 15:10
Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
openfire2691 Offline OP
Junior Member
openfire2691  Offline OP
Junior Member

Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
Oh my gosh that's perfect! Thanks! I don't know how I missed that. I've been looking through these forums, AUM magazine, AU resources and the manual for a couple days now and haven't found anything! Thanks for your help.


When your script isn't working right, usually it's because it's doing exactly what you told it to. -An Unknown Programmer
Re: Sprites: Panels/Entities [Re: openfire2691] #226753
09/11/08 04:12
09/11/08 04:12
Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
openfire2691 Offline OP
Junior Member
openfire2691  Offline OP
Junior Member

Joined: Sep 2006
Posts: 74
Northwestern Oregon, United St...
Well I guess that wasn't as perfect as I thought. Now I need to be able to assign a function to each "enemy" panel. That, or I need to be able to create one function to run all of my enemies, but that would require an array whose length will have to vary between 0 and at least 100. I'm assuming the array way would be better. Should I just create a massive array and fill it up as I need to?


When your script isn't working right, usually it's because it's doing exactly what you told it to. -An Unknown Programmer

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1