Hi there everyone,
As the title says I cannot understand where to put my end game conditions code. As my game is small it doesn't have much, but at least I want it to have a proper way to end. I figured I can use the EndCutscene function to create my end cutscene, but where do I leave the conditions ? I tried putting them in a custom function, but it never triggers. I may have botched it a little bit.
Code: ags
One more thing, as you might have seen in the code I used DrawImage. I use it a lot in my game, since all the characters don't "speak", but rather pop up speech bubbles with images in them (so as to make it more language neutral). I create a backup and then use DrawImage to draw the bubbles and then return the backup, to create the illusion of speech bubbles. However, I cannot make it in such a way that you can click with the left mouse button and the bubble disappears, I can only make it with the Wait() function. Is there someone that knows a little bit more and can help me with my problems ? All advice are appreciated. Sorry for the language, English isn't my mother tongue.
As the title says I cannot understand where to put my end game conditions code. As my game is small it doesn't have much, but at least I want it to have a proper way to end. I figured I can use the EndCutscene function to create my end cutscene, but where do I leave the conditions ? I tried putting them in a custom function, but it never triggers. I may have botched it a little bit.
function Ending()
{
if((cAsparuh.HasInventory(iHayPiece)) && (cSoldier_Fort.HasInventory (iSwords))){
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(270, 200, 41);
surface.Release();
Wait(100);
QuitGame(1);
}
}
One more thing, as you might have seen in the code I used DrawImage. I use it a lot in my game, since all the characters don't "speak", but rather pop up speech bubbles with images in them (so as to make it more language neutral). I create a backup and then use DrawImage to draw the bubbles and then return the backup, to create the illusion of speech bubbles. However, I cannot make it in such a way that you can click with the left mouse button and the bubble disappears, I can only make it with the Wait() function. Is there someone that knows a little bit more and can help me with my problems ? All advice are appreciated. Sorry for the language, English isn't my mother tongue.