figured it out.
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 MenuQuote from: Vince Twelve on Wed 09/06/2010 20:08:47
To get it on top of the characters, you would draw it to an object, GUI, or overlay. You would then Wait() for however long you want it to show up and then release the drawing surface, delete the sprite, dispose of the overlay, whatever is appropriate to clear out that memory. You'll need to read about dynamic sprites and drawing surfaces in the manual if you're not clear on them.
Let me know if you need something more specific.
Quote from: Vince Twelve on Wed 09/06/2010 19:40:08
When you draw a line, the whole line just pops into existence, it doesn't start at one end and grow outwards. Is that what you're trying to do?
If you want to do that, it's going to be more complicated because you'll have to calculate the point forming an increasingly large line segment each frame and draw the line onto a GUI or overlay every frame until it reaches the other character.
Is that what you want to see? The line starting at one character and growing outwards until it reaches the other character?
Random (int max)
int ran=Random(2);
if (ran==0) cEgo.ChangeRoom(1);
else if (ran==1) cEgo.ChangeRoom(2);
else cEgo.ChangeRoom(3);
Quote from: AdamM on Wed 09/06/2010 00:13:28
So:Code: ags ViewFrame *frame = Game.GetViewFrame(cEgo.NormalView, 0, 0); //And then: cEgo.z=(0 - (Game.SpriteHeight[frame.Graphic] / 2));
That, uh, that would work, right?
Quote from: Khris on Sun 06/06/2010 18:34:18
Drew, this won't work as intended.
Your code will only check if the player is within a 200x120 rectangle to the top-right of the NPC.Code: ags int xd = player.x - cNPC.x, yd = player.y - cNPC.y; if (xd >= -200 && xd <= 200 && yd >= -120 && yd <= 120) { ... }
As for the actual distance, there are several threads dealing with that, including how to check for the NPC being inside an ellipse, like Lyaer explained.
The factor's supposed to be 200/120 = 1.67, btw.
if ((cNPC.x - cPlayer.x < 200) && (cNPC.x - cPlayer.x > -200) && (cNPC.y - cPlayer.y < 120) && (cNPC.y - cPlayer.y > -120)) {
........
}
if ((cNPC.x <= 200 cMainCharacter.x) && (cNPC.y <= 120 cMainCharacter.y)) {
stuff happens;
}
if ((cNPC.x - cMainCharacter.x <=200) && (cNPC.y - cMainCharacter.y <= 120)) {
stuff happens
}
Quote from: Chicky on Wed 26/05/2010 12:35:39
Why the photo mashup? This would like nice if it was 3dPanorama module etc.
It is a very clean art style, i'll give you that. Is there any actual story?
Quote from: Chicky on Wed 26/05/2010 18:15:43
Why follow the trend?
Fair play though, i like the textures you've got going drew.
Quote from: Mods on Wed 26/05/2010 14:19:19
Looks good, Drew! I expect to tear my hair out over the solution...
Quote from: Snake on Tue 25/05/2010 23:52:39
Drew, where is the cursor and/or GUI? These need to be IN-GAME screenshots.
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.099 seconds with 19 queries.