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 - snerzel

#2
Code: ags
 
function repeatedly_execute() 
{
 if (!character.Animating)
  {
   cBoy.Animate(0,7,eRepeat,eNoBlock);
  
  cGirl.Animate(0,8,eRepeat,eNoBlock);
  }
  
}
#3
tried it, It keeps telling me '[' expected on the "if" line.
#4
THANK YOOOU!!!!! Things were becoming quite messy. only thing now is how do I get it to resume the idle animation for both characters?
:grin:
#5
Well not long after a problem is fix another is found :undecided:   I'm still new to this!

My problem is that when I type the proper word in the text parser to trigger and event it keeps running the other scripted events also, adds up all the scores, and freezes on the last frame of animation without resuming the idle animation.

I keep reading the manual on this and as far as I can tell it shouldn't run EVERYTHING under this function like this. Although being new to the C language and ags I wouldn't be surprised if I'm missing something. 

Here's my script to help anyone who wishes to help me (Please excuse the words and what's being said, They're inside jokes):

function TextBox1_OnActivate(GUIControl *control)
{Parser.ParseText(Cmdbox.Text);
Cmdbox.Text= "";
String badword = Parser.SaidUnknownWord();
if (badword != null) cGirl.Say("I don't have words for that.");

if (Parser.Said("madness"))
cGirl.Say("Madness?..... THIS.. IS.. TEXAS!!");
GiveScore(5);

if (Parser.Said("hair"))
cBoy.Animate(1,5,eOnce);
cGirl.Say("Floof the hair for power!");
GiveScore(20);

if (Parser.Said("arms"))
cBoy.Animate(5,5,eOnce);
cGirl.Animate(4,3,eOnce);
GiveScore(20);

}


#6
Thanks everyone! (especially Gilbert). Had to mess around my script and naming order but I got all working now! THX  :grin:
#7
Thanks Gilbert! That is now working as it should, but I still can't figure out how to get the text to disappear after you press enter. so the player doesn't have to keep deleting the last thing they typed.
#8
Been experimenting with what you said. Still nothing happens. i.e. text entered into the textparser does nothing when enter/return is pressed or I get an error in the global script. What is the process code?
#9
OK I'm working with the text parser in ags and I can't figure out how to get text that the player submits to both trigger the appropriate event and clear the text from the text parser when enter/return is pressed. Also under what function should the text parser code be put?

The tutorial I've be following has neglected to explain this.   
#10
Thank you!! That worked!! I cannot believe I didn't try that. Everything now runs as it should and I can finally move on to the next step.

THANKS!!!
#11
I have the animations in my room script for after fade in, as  cEgo.Animate(0,6,eRepeat);
Once the game runs this it stops the textparser and won't do anything else other than run that one animation continuously.
I've messed around with writing eNoBlock instead of eRepeat but I still get the same problem.
#12
Go easy on me. I'm very new to this.
I'm making my first game for my friend as a gift. I've been building this game since December and trying to script has been my biggest challenge (it will be the death of me if I can't get it).

My problem is I have 3 things going when the game starts: A text parser box, and two different characters looping an idol blinking animation. And for probably a very obvious reason, I can only get one thing to run. i.e If the text parser works then no ones blinking, If one character's blinking then the text parser doesn't work and the other character doesn't blink.   

Any help would be greatly appreciated!
SMF spam blocked by CleanTalk