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.

AppGameKit Classic Chat / GetContactSpriteID commands give me nothing but 0

Author
Message
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Jul 2012 20:46
More contact problems. Check the included file for a shot. As far as I can tell this code should print out the ID numbers of the level tiles the player is in contact with. But all I get are zeros. Also tried with ID1. Player is a dynamic sensor sprite, tiles are static sprites.



Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jul 2012 21:47
I could be wrong but I think the command you need is getSpriteContactSpriteID2 not getContactSpriteID2... On the iPad at the moment and about to put my son to bed so can't check!


this.mess = abs(sin(times#))
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Jul 2012 22:25
Man, those two commands look almost identical. Didn't know there was another one. Thanks again baxslash for saving my day

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jul 2012 22:46
Screwed me up once, just passing it on


this.mess = abs(sin(times#))
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Jul 2012 22:56
WOW, just checked the help file! The description for both GetSpriteFirstContact and GetSpriteNextContact say to use GetContactSpriteID2. I thought I copied the command directly from there

Login to post a reply

Server time is: 2024-05-05 10:54:58
Your offset time is: 2024-05-05 10:54:58