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 / types and arrays

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 19th Feb 2019 18:50
I'm not real familiar with types or a arrays I usually don't use them but my new game will need them. I'm not sure what I need. if I have 20 objects in my game and 5 of them are doors I want to be able to check object collision intercept or vector ect return the object ID and check it to see whether it is a door or not I'm assuming I wanted a custom type and an array I'm not sure how to do this
A child's dream never dies.





blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Feb 2019 22:12
Something like this. Most important thing to remember is arrays start from zero



Add elements to the array like so;


Remove element from the array like so


More here
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 21st Feb 2019 02:53
thank you so much blink!
A child's dream never dies.





Login to post a reply

Server time is: 2024-11-23 08:07:56
Your offset time is: 2024-11-23 08:07:56