Suggestions for future releases of AGS

Started by Mouth for war, Mon 22/06/2009 15:31:23

Previous topic - Next topic

Mouth for war

Maybe I post this in the wrong forum. I didn't really know where to post it. But i have a suggestion for future versions of AGS. I've looked through the manual quite alot and if i have missed this I'm sorry. For example when an animation is playing and you want something specific to be done during that animation...maybe you need to put something in a guy's drink to make him pass out...and can only do so when the character looks away..for example"cMan.animationframe = 2" /add code. Maybe just me who would find this useful but...only a suggestion. If a simple way of doing this already exists I'm sorry and maybe you can enlighten me :)
mass genocide is the most exhausting activity one can engage in, next to soccer

GuyAwesome

Do you mean like Character.Frame?

You might also want to check the View and/or Loop currently being used (not so much in your example, but there might be a call to), but there's properties for them, too :)

Mouth for war

hmm maybe it's just that hehe. But is is possible to change a variable then for example...if the Characterframe is = 4 or whatever the guy looks away and the variable changes to 1 and when the characterframe reached = 11 he looks back again and the variable changes back to 0...and only when it's set to 1 you can put the  poison in the drink. I'm just a lousy coder :D I'd be glad for a example of such code :)
mass genocide is the most exhausting activity one can engage in, next to soccer

GuyAwesome

Off the top of my head
Code: ags

bool canPoison;

// room_RepExec or global repeatedly_execute
if (cMan.Frame >= 4 && cMan.Frame <=11) canPoison = true;
else canPoison = false;


// wherever the 'add poison' code goes (use inv on char?)
if (canPoison) {
  // Do stuff
}
else player.Say("Not right now..."); // or whatever


Depending on how exactly you've set things up, you might need to make canPoison a global variable (i.e. so you can set/check it in room and global scripts), and/or add a few checks the cMan and the player are in the right room (so you can't poison the poor fella when he's in the office and not the canteen, for example). In this specific case, it might actually be easier to use if (cMan.Frame >= 4 && cMan.Frame <=11) directly in the interaction and skip the variable, unless you're likely to need it for something else (e.g. other interactions with cMan).

Mouth for war

mass genocide is the most exhausting activity one can engage in, next to soccer

SMF spam blocked by CleanTalk