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

Topics - MaximusDecimus

#1
It has been confirmed that you can actually walk to Raseir without the caravan in the original Quest for Glory 2. So I was wondering, can you do this in the remake by AGDI?
I don't think you can, but I'm still asking.
#2
I'm trying to make an overhead game where you explore a place, avoid monsters, unlock doors etc. I'd like to be able to move with the arrow keys only (and not with the mouse). But the built-in code for keyboard movement makes you gently tap the arrow key, then release it and the player moves in a direction. I'd like to press and hold the arrow key and make the character move only when the key is HELD DOWN. Is it possible with AGS?

The second problem is that you're looking at this game from a bird's eye perspective, and there's a big issue with walkable areas. The character is registered at bottom middle, so only that small part of the character cannot pass through walls. I want to achieve that whenever even a single pixel of the character touches a non-walkable area, he stops there. How to do it?
#3
I have a life counter that shows different images when the player's hit points change. The function looks like this.

Code: ags

function DealLife() {

if(p.HP < 1) object[0].Graphic = 105; // empty life
else if(p.HP <= p.MaxHP * 5/100 && p.HP > 0) object[0].Graphic = 189; // more than 0 but less than 5% of max life
else if(p.HP <= p.MaxHP * 10/100 && p.HP > p.MaxHP * 5/100) object[0].Graphic = 104;
else if(p.HP <= p.MaxHP * 15/100 && p.HP > p.MaxHP * 10/100) object[0].Graphic = 188;
else if(p.HP <= p.MaxHP * 20/100 && p.HP > p.MaxHP * 15/100) object[0].Graphic = 103;
else if(p.HP <= p.MaxHP * 25/100 && p.HP > p.MaxHP * 20/100) object[0].Graphic = 187;
else if(p.HP <= p.MaxHP * 30/100 && p.HP > p.MaxHP * 25/100) object[0].Graphic = 102;
// etc.
else if(p.HP <= p.MaxHP && p.HP > p.MaxHP * 95/100) object[0].Graphic = 46; // full life
}


This works just fine when using DirectDraw. But, when I set it to Direct3D, the life counter appears to be full (at 100% HP) the whole time, apart from when the player dies (at zero HP). All the sprites in the middle are missing. By the way, I am not calling this function in repeatedly execute, it's called every time a monster hits the player.

Can you please tell me why things don't go like they should with D3D?

#4
I'm making a RPG battle simulation game (it has a battle system similar to Quest for Glory II). I've set the opponent to attack repeatedly using the repeatedly execute function in the global script. But, if I want the opponent to attack the player every X game loops, I have to either use timers or the Wait function. With timers, it's overly complicated and I can't get everything to work properly, but if I use the Wait function, it also freezes all other scritps!! It be so much simpler if AGS had a delay function or something: wait X game loops, then proceed to the next line while not pausing all the scripts.   :-\

Specifically, when the opponent starts an attack, the function needs to wait 4 game loops before playing the attack sound. Then, after 10 game loops, it has to play the hit sound and subtract some hit points, after 80 loops the opponent can attack again ... How to do these simple delays? Please help because I'm kind of stuck.  
SMF spam blocked by CleanTalk