Check my edit that I wrote while you posted.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuif (player.ActiveInventory == iKey) Display("I used the key on another item");
//Replace "treasureobject" with the proper object pointer.
treasureobject.Baseline = (player.y - treasureobject.Y)/2;
if player.IsCollidingWithObject(treasureobject) {
//Do your stuff, remove the object, add score etc.
}
treasureobject.Baseline = 0; //only relevant if it will eventually be turned on again
//Add or subtract a percentage of the object's height. The number "20" I just picked at random. You can always experiment.
int percentageheight = Game.SpriteHeight[treasureobject.Graphic]*20/100;
if (player.y < treasureobject.Y-percentageheight) treasureobject.Baseline = treasureobject.Y-percentageheight;
else if (player.y > treasureobject.Y+percentageheight) treasureobject.Baseline = treasureobject.Y+percentageheight;
else { //within these coordinates the player is bound to collide with the object. If not for drawing order, we could just set baseline=player.y
if (player.y>treasureobject.Y) treasureobject.Baseline = player.y-1;
else treasureobject.Baseline = player.y+1;
}
Quote from: ProgZmax on Mon 16/06/2008 20:46:22Would it be possible to modify or at least add another type to guis to freeze EVERYTHING except themselves and mouse control (like an EXCLUSIVE tag)? Everything would include processing Waits,changerooms,animations, anything except gui scripts, mouse movement and control and keypresses.
QuoteSpoiler
BTW, Garagegothic, Jason is able to pick the 'right' answer in everything not just pick black and whites. Small micalculation there from you! Wink[close]
QuoteGaragegothic: You can click through the dialogue in DITR... Huh
Quote from: SnarkyHmm, I wonder if there really are so few AGS games that exhibit excellence in writing. I seem to remember a number of titles with snappy dialog. Comedy titles more than serious games, probably, but still...
Quote from: I have to go in a few minutes but I will be happy to answer your points/questions later tonight. While I do not disagree with some of the things you said, it seems to me that there are a number of things you missed or misunderstood.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.045 seconds with 15 queries.