Menu

Show posts

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 Menu

Messages - jumpjack

#61
I see these 3 functions in the editor 3.6.0RC3:

  • AreCharactersColliding
  • AreCharObjColliding
  • AreThingsOverlapping

But only one is documented both in offline and online help, "AreThingsOverlapping". Maybe the others have been deprecated in 3.6.0? I see that there are Character.IsCollidingWithChar , Character.IsCollidingWithObject, Object.IsCollidingWithObject  , maybe they replace the missing global functions?

But I don't understand if I can create objects and characters at runtime.

#62
I can't find any example or explanation about sprites collisions management, any suggestion? I see I can monitor collision of objects and characters, but nothing specific about sprites (more specifically: dynamic sprites).

Are dynamic sprites the only AGS items I can programmatically create? no objects neither characters?

And, as I already asked above: can I access/customize the pathfinder algorithm from a script?
#63
Player can move freely inside its tile, but can't go to adiacent tile if it contains something.

Click on "start emulator with demo game" to see the game I am trying to implement:
https://jumpjack.github.io/oricutronJS/oricutron.html
#64
I found that the demo game included in AGS has a keyboard management script which I can edit at wish.

What about the pathfinder algorithm? I need to check not just the final destination, but also the path: the embedded nonwalkable area method is not enough, I need to manually monitor character positions not just by one pixel on his feet, but by an area around his feet, which shall not overlap nonwalkable areas.

In other words, the non walkable area surrounding player's feet, currently used to avoid collisions with other characters, should be used also to avoid collisions with nonwalkable areas.

I wonder if I can build my 10x10 tiles room by "pasting" 100 invisible characters above the 100 tiles I already pasted to build the room, so I can "cheat" and let the engine make the player avoid the forbidden tiles...
#65
Can I "intercept" character position before it's actually updated, to prevent its updating upon my own conditions?
I see that DestinationX/Y only contain final destination for mouse control, not for keyboard control.
#66
My character apparently has .z and .Baseline values constantly = 0 while it moves around the room (I put their values into a label in global script, together with x and y). Should I enable anything to get them updated?

Additionally, "z" looks more like a "real world" value rather than an "engine value", as if I manually increment .z, the character raises, but if I increment .Baseline, character does not move, but it gets drawn behind some objects with different baslines...

#67
Thanks, now it works.

What about the other questions? My player is currently walking over everything...
#68
Documentation on overlays say that this line:

Code: ags
Overlay* myOverlay = Overlay.CreateGraphical(100, 100, 300);

Should show sprite slot 400 at position 100,100 of the screnen... but I don't see anything.

To see something, I have to add:

Code: ags
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(roomX - tilewidth/2, roomY-tileheight*4/2, myOverlay.Graphic);

Same happens for everything else: Overlay.CreateRoomGraphical, Overlay.CreateRoomTextual, Overlay.CreateTextual,...

I can't find any other example on overlays, can anybody help?

But actually I don't know if I need overlays for my purposes: I want to build a room tile by tile, and some tiles have transparent pixels, so the player should be visible when it pass behind such tiles.

Maybe I should use objects instead? Or something else?

Or should I create my own walkbehind image programmatically? I have available two versions for each tile image: one single PNG with some transparent pixels, or a BMP couple (image + transparency mask).

SMF spam blocked by CleanTalk