Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Mixing Visual Editor sprites with code generated sprite arrays

Author
Message
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 11th Jan 2018 11:31
I am trying to organize my code workflow and not sure how to plan the following scenario:

I have a sprite for a bullet that I size/edit etc in Visual Editor [eg name = Sprite 9, auto assigned ID = 1000010 bla bla]

Now I need to generate a bank of 50 bulets, how can I refer to the resized/edited sprite image created in the Visual Editor, [stored in data.agkd] (rather than the unedited image in media)?

Let me know if I am not being clear
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 11th Jan 2018 16:53
bullet0 = VisualEditor_GetID("Sprite 9",1)
for a = 1 to 50
Bullet[a] = CloneSprite(bullet0)
next a
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 11th Jan 2018 20:22
Nice one! Appreciated!

Simples!

Login to post a reply

Server time is: 2024-11-22 20:35:44
Your offset time is: 2024-11-22 20:35:44