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

#1
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);

}


#2
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.   
#3
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