Instateate an image

Monkey Forums/Monkey Programming/Instateate an image

wiliamtn(Posted 2013) [#1]
Hi everybody sorry my ignorance but i do not know how do it.
When i click in a button i'd like to create instances of one image.
Anybody can help me please?

And sorry my terrible english


Jesse(Posted 2013) [#2]
That's a very vague question. What do you mean by instantiate?

It would help if you could post some code.


Beaker(Posted 2013) [#3]
You make instances of an image on screen by using DrawImage() multiple times. I hope this helps.


wiliamtn(Posted 2013) [#4]
I'll try to explain what do I want.
An example of what I want to do is park Trayler Zombie game, this game when I click on the buttons create several characters like hillbillies with a shovel, shooters.


Jesse(Posted 2013) [#5]
I think you are having trouble how to use objects or even classes so you are going to have to look at a couple of tutorials:

here is a mini tutorial by midimaster:
http://www.monkeycoder.co.nz/Community/post.php?topic=4200&post=45082

and video tutorials by invaderjim:
http://www.monkeycoder.co.nz/Community/posts.php?topic=3318

you need to know how to crate objects,how to use "List" to store objects, how to go through the list with a for/next loop and how to remove objects from a list. That should be basically is what you will need to 'instantiate' and delete objects.

if you want a quick example, Maybe somebody can post some code for you. I don't have time right now maybe tomorrow.


wiliamtn(Posted 2013) [#6]
Thanks Jesse

I will read these tutorials.