KQ2 related AGS code (spoiler I suppose)

This is a public forum, where you can find out everything you wanted to know about making games. Please don't use this forum as a place to recruit new members.

Moderators: adeyke, VampD3, eriqchang, Angelus3K

Post Reply
Message
Author
Broomie
The Enigma
Posts: 2601
Joined: Thu Jan 02, 2003 1:00 am
Location: UK

KQ2 related AGS code (spoiler I suppose)

#1 Post by Broomie » Sat Jul 30, 2005 10:47 pm

In KQ2, there is a part where you're in the swamp and you have to follow the directions on the piece of paper from the church and it randomizes the letters each time you play the game.

The questions I'm asking is, how do you do that? The exact same code, the exact same thing. Yeah, I may aswell say this is for that Project Bromios game I'm working on. (at last)

Well, I'm not the programmer I already got someone helping me with that, yet that's the only thing he isn't sure about. Now I have no idea what sort of code to expect, whether it's a huge piece of script or something different, I'd really like to know how to do this. I'd be really appriciative if someone could tell me. :)

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#2 Post by Erpy » Sat Jul 30, 2005 11:10 pm

Simple. There's, say, 5 different poems...one with its own set of directions.

In the AGS-editor, go to the script-dropdown menu and select Game_Start.

In the section that opens, put something like:

Code: Select all

SetGlobalInt(100, Random(4));
Now GlobalInt 100 has a different value each time you start a new game.

Image

Post Reply