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

#2841
if (GetGlobalInt(1) == 0) {
character[0].StopMoving();
cAi1.Say("&1 Ok, lets get moving!");
cAi1.Say("&2 Ellie, I want you to check the containers!");
cAi1.Say("&3 Get going!");
cAi2.Say("&1 Yes sir!");
character[2].Walk (269, 140, eBlock);
object[0].SetView(3);
object[0].Animate(1, 3);
character[2].Walk (313,140);
cAi1.Say("&4 Mike, you have to check the engines.");
character[2].ChangeRoom(10);
object[0].SetView(4);
object[0].Animate(1, 3);
cAi1.Say("&5 You know where they are, so get moving!");
cAi1.Say("&6 I have to get to the command room, and send out the distress signal.");
SetGlobalInt(1, 1);
}


Ok, this code works as it is, but where does it set the variable, as in CREATES the variable?

Does this happen automativcally at GetGlobalInt(1)?
#2842
But doesn't this cause the int cutscene to always be zero when read, as it is defined at the start of the script? This is excactly my problem.
#2843
Why did I just start feeling like a moron?...  ;D

Thanks!

But for the future, how can I make a variable that can be called upon any rooms scripts? Is it even possible? I tried setting a variable in the global script, but it couldn't be called upon inside the room. Should it work or was I just... wrong?
#2844
Ok, I'm back... again...

Does anybody have ideas on how to make this script:

character[0].StopMoving();
cAi1.Say("&1 Ok, lets get moving!"); 
cAi1.Say("&2 Ellie, I want you to check the containers!");
cAi1.Say("&3 Get going!");
cAi2.Say("&1 Yes sir!");
character[2].Walk (269, 140, eBlock);
object[0].SetView(3);
object[0].Animate(1, 3);
character[2].Walk (313,140);
cAi1.Say("&4 Mike, you have to check the engines.");
character[2].ChangeRoom(10);
object[0].SetView(4);
object[0].Animate(1, 3);
cAi1.Say("&5 You know where they are, so get moving!");
cAi1.Say("&6 I have to get to the command room, and send out the distress signal.");


To only run once in the game.

The script is run when the player steps into a region, but the second time the player steps into the region, the script is run again, and the game crashes because cAi2 is no longer in the room! I was thinking about making a variable that changes from zero into one the first time this is run, but if I put this variable into the room script, it gets defined into zero every time player enters the room!

I've thought about making a second room, otherwise the same than the first, but without this one region, but this seems a bit troublesome.

My guess is that you people have a simple solution here, but it just eludes me...
#2845
The problem was mislocating the waypoint of the NPC, so that the NPC was trying to move through a blocking object. Moved waypoint, and had the door actually open so that the NPC wasnt trying to walk through the door, and works fine now.

And I had never heard of eblock before ^^. I've tried reading the tutorials, but I've never bumped into that.

Thanks a buch! Getting back to work!
#2846
FIXXED!!!

Figured out the problem myself.

Now for a simple question: How do I get the script to wait for the last one to have been completed before the next part starts?

Situation now: The NPC starts moving, and as soon as the NPC starts moving the door opens.

Wanted situation: The NPC starts moving, reaches his waypoint near the door, the door opens.
#2847
Yeah, I'm back again!

This time I have a new problem going on. In my game's intro, I'm trying to get a character to move to the room's door, and to then go to the next room, but when the NPC wlks onto a region (any region, this one is supposed to change the characters lighting as he walks into the light).

How can I get the NPC to walk over these preset regions. The excact error I get says : "Error: Move character: Character not in current room."

I'm simply using the

"cAi1.Say("&3 Get going!");
cAi2.Say("&1 Yes sir!");
character[2].Walk (296, 140);"

script.
#2848
Hahaha!

I realized my mistake: the original defining of "int tupu" was in the wrong place!

Thanks for the help, I think this will get me quite a bit further with my game.

If I need more help, I'll return to this thread in the future.
#2849
The int tupu; is in this code for now, and thats another problem. I've triedn putting it in global script, but it doesnt work. it just says "undefined symbol 'tupu' ".

EDIT: You were right, the problem was the capital "O":s, but I still cant seem to get the Tupu working.

As it is it is in the global script, and I get the error metioned above.
#2850
Im starting a game, and will probably need quite a bit of scripting help, so I'll make this one thread, and put my questions here as I come up with them.

My first problem is the following:

int tupu = 0;
if (tupu == 0) {Object[0].SetView(7);
tupu++;}
else if (tupu == 1) {Object[0].SetView(8);
tupu--;}

This script gives me an error "variable "[" is already defined." and I have no idea what this means. This script is meant to make a door open when a button is pressed, but if the door is already open, it closes the door.

I am inexperienced with this scripting, but if I'm correct this seems to be very similiar to Java code, with which I have some experience.

Any help, and patience, is truly appreciated.
#2851
Thank you!

I've tried reading the manuals, but I never realized to use "cEgo.Say" (probably because I'm a newbie just starting to learn). Gamemaking AHOY!
#2852
Really sorry for being stupid and all, but:

When I run a script "Display("&1 Looks like a plaque.");" the message appears in a white box (Narrator). Knowing absolutely nothing about these scripts, I have no iea on how do I get the message to appear ar speech on my EGO?

To be excact:
-  How do I get the EGO to enter speech animation (I have the view runing ok)?
-  The message to appear on top of the game character head?
-  The sound to be heard?

If someone could be nice enough to help me out on this, it would be most appreciated.
#2853
The template link is sadly dead.
Any other leads on where to get this?
SMF spam blocked by CleanTalk