Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 04/29/26 18:09
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 4,330 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ukgamer, valino, juergenwue, VladMak, Geir
19210 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 | 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