Take a look at the verb coin template: http://www.freewebs.com/skimbleshanks/templatesandmodules.htm
There also lots of threads about verb coins, try a forum search.
There also lots of threads about verb coins, try a forum search.
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
// room script ("{}" button in Room settings pane)
int sequence; // define static variable that stores order
// script for door3 (interact with hotspot/object, walk onto region, whatever you want)
if (sequence == 0) sequence = 1; // if this is the first door chosen, set variable to 1
else sequence = 0; // if wrong choice, reset variable
NewRoomEx(character[GetPlayerCharacter()].room, 150, 150); // re-enter current room and position player at door3
// script for door1
if (sequence == 1) sequence = 2; // if this is the second door chosen, set variable to 2
else sequence = 0; // if wrong choice, reset variable
NewRoomEx(character[GetPlayerCharacter()].room, 50, 150); // re-enter current room and position player at door1
// script for door2
if (sequence == 2) NewRoom(THENEWROOM); // if this is the third door chosen, go to the next room
else NewRoomEx(character[GetPlayerCharacter()].room, 100, 150); // if wrong choice, re-enter current room and position player at door2
sequence = 0; // reset variable
Quote from: Pumaman on Wed 23/03/2005 19:04:31QuoteAnother one... if you set a character's speech view to something excessively large (e.g. 320 pixels wide) using Sierra-style speech, then once the character starts speaking, the game crashes with an error message "unable to allocate -166 bytes of memory"
And another one... in the dialog editor, you can surround text with /* */ and it will be highlighted as comment. But it is still compiled (and causes errors). But lines starting with * are ignored.
Ok, thanks for the info, those two aren't too serious since the likelihood of them occurring is quite small, so I'll leave them for now.
if (1.0 < 2.0) Display("Compiles.");
if ((1.0 < 2.0) && (1.0 < 2.0)) Display("Does not compile.");
Quote
Error: Operator cannot be applied to this type
if ((1.0 == 2.0) && (1.0 == 2.0)) Display("Compiles.");
if ((1 < 2) && (1.0 < 2.0)) Display("Does not compile.");
QuoteError: Type mismatch: cannot convert 'int' to 'float'
if ((1 == 1) && (1.0 == 1.0)) Display("Compiles.");
Quote from: RickJ on Sat 26/03/2005 02:17:40
I don't believe the Global Script Header is included into Module Script, only the Module Header.
Quote from: RickJ on Sat 26/03/2005 02:17:40In my mind "Internal" seems to apply equally to both.
Quote from: RickJ on Sat 26/03/2005 02:17:40
The #error directive does more or less the samething as AbortGame() but at compile time instead of at runtime.
static function MyModule::DoSomeStuff() {
#ifndef MODULE_YOURMODULE
AbortGame("This function depends on 'YourModule'!");
#endif
// (the stuff)
}
Quote#error *** Err-MyModule, can't find required module "YourModule"!
QuoteAt the time of this writing, it is not clear to the author what scope or other charactistics enums defined in the Module Script have
// global script
int isnight = 1;
// global script
int isnight;
export isnight;
// main script header
import int isnight;
// room script
import int isnight;
Quotestatic
member functions are recognized but the auto-complete feature of the
Script Editor.
Quote
// Note: String variables are ->NOT<- permitted inside a
// struct. Use a char array instead.
Quoteoutside the bounds of any fucntion
Quotegive credit where credit is do.
Quote"Derrived from IniFile by RickJ"
Quotecopiler errprs
Quoteapporpiate error message
// dialog script for dialog 0
//...
@8 // Do you know Leia?
vader: Leia is Luke's sister.
ego: I see...
run-script 12 // call dialog_request function and pass 12 as parameter
option-off-forever 8 // turn this dialog option off
return // show dialog options again
//...
// global script
function dialog_request(int parameter) {
if (parameter == 12) { // if function called via "run-script 12"
SetDialogOption(1, 3, 1); // unlock dialog 1's hidden dialog option 3
}
}
// dialog script for dialog 1
//...
@3 // Is it true that Princess Leia is your sister?
luke: NOOOOOOOOOOOO!
option-off-forever 3 // turn this dialog option off
return // show dialog options again
//...
// main global script
function DisplayGK1Speech(int charid, string text) {
int font = 0; // number of speech font (is there a function or variable to get this?)
int xoffset = 2; // left border
int yoffset = 0; // bottom border
int ypos = (system.viewport_height - GetTextHeight(text, font, system.viewport_width - xoffset)) - yoffset;
DisplaySpeechAt(xoffset, ypos, system.viewport_width - xoffset, charid, text);
}
// main script header
import function DisplayGK1Speech(int charid, string text);
// script for character 0: Look at EGO
DisplayGK1Speech(EGO, "It's me.");
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.099 seconds with 15 queries.