colecting objects

Started by viktor, Fri 10/11/2006 11:19:53

Previous topic - Next topic

viktor

hello first of all. It's been a while since I last posted here. Well I'll get straight to the point. I'm making a simple platform game. No fighting or shooting. It's about collecting objects (lets say diamonds for example). I'm using the "ninja accident" open source as reference. But that game dosn't have the collection function. If I have my diamonds apear as objects how do I make it that the character collects the diamond when he steps over the object? Thanks a bunch in advance...

EDIT: I also just noticed that a lot has changed in the newer versions of AGS. So how do I make that my character gets a certain amount of points when he collects the diamond?
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Ashen

#1
For the first part, you could maybe use Character.IsCollidingWithObject. Just run checks in repeatedly_execute as to whether the player is is touching the diamond object (or any one of them), turn that object off and add the inventtory item / increase the variable / however you're tracking the number of diamonds they've got.
You might also be interested in SSH's Pixel Perfect Collision Detedtion module, if the normal IsColliding isn't precise enough for you.

The second part: GiveScore. That hasn't changed.

I'd suggest re-reading the manual, to familiarise yourself with the new commands, and which commands have been renamed.
I know what you're thinking ... Don't think that.

viktor

many thanks ashen. I'll try it right away  :)
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

SMF spam blocked by CleanTalk