Before the boat I was about to make a seat... So I guess my vote goes for Tabata!
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: LeKhris on Tue 11/10/2011 00:02:29
In case you want to switch, here'd be code:Code: ags // in on_key_press if (keycode == eKeyUpArrow) { int x = player.x - GetViewportX(), y = player.y - GetViewportY(); Hotspot*h = Hotspot.GetAtScreenXY(x, y); if (h.ID > 0) h.RunInteraction(eModeInteract); else { Region rr = Region.GetAtRoomXY(player.x, player.y); if (rr.ID > 0) object[rr.ID].RunInteraction(eModeInteract); } }
So no extra function and no properties necessary.
Quote from: LeKhris on Mon 10/10/2011 22:03:57
It didn't occur to me until now but you don't really need to draw hotspots. It's enough to name them and set up the interaction(s) and region number.
Thinking about this further, that means it makes more sense to use regions only for objects and draw the hotspots not over the background object but the floor area.
That way one can use region 1 for object 1, region 2 for object 2, etc. while the game also checks for hotspots at the player's feet.
So no need for all the custom property business.
On the other hand, seeing all areas where pressing UP triggers something at once isn't such a bad thing either.
Quote from: KodiakBehr on Mon 10/10/2011 20:41:06
I put it in the same place. The hotspot has a property known as "region" that is set to 2, as per the instructions.
The only difference was that the variables "i" and "p" were already in use and were substituted for unused two-character variables. I did this twice just to make sure there wasn't an "i" or a "p" missed. It's very frustrating when somebody holds your hand through the code like this and you still can't pull it together.
Quote from: KodiakBehr on Mon 10/10/2011 20:21:47
rr.ID never goes above zero.
Does the second bit of code that's intended to be above on_key_press need to be within a specific function?
Quote from: KodiakBehr on Mon 10/10/2011 19:59:55
Did this code work for you without modification, Ekeko?
I'm doing something similar and not having any luck.
function region2_Standing()
{
if (keycode == eKeyUpArrow) player.Say ("Something");
}
Quote from: Kastchey on Mon 10/10/2011 11:12:02Thanks, guys!
I see no reason to bash your graphics, the screenshots look clean and kind of charming in their simplicity.
Quote from: Kastchey on Mon 10/10/2011 11:12:02Yeah, after finishing the game I'll translate it. Not only for the AGS Community, but also because I know some people that would kill me just to get translated versions of my game!
Will there be an English version?
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.037 seconds with 16 queries.