Doom Comic
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Doom Builder > Script problems DB2
 
Author
All times are GMT. The time now is 21:13. Post New Thread    Post A Reply
Swec
Junior Member


Posts: 127
Registered: 08-09


Hello.

I try to get a script to work but i get some trouble.

code:
#include "zcommon.acs" script 1000 (VOID) { //Alarm player of artillery Reguest Print(S: "INCOMMING ARTILLERY!"); //The Text messange that is displayed. //Short Delay Until artillery begins. Delay(130); //Lanch Artillery for(int i = 0; i < 30; i++ ) { delay(35); // Time between projectiles Thing_projectile(random 141,163),127, 90, 0, -100); }


In game i get i think it stand ' P_startscript:unknown script 232


My trigger is a line and the action 80 and script number 1000. player walks over.

Old Post 06-04-10 14:21 #
Swec is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11204
Registered: 07-07


If the script is called by a line, unless the map is in UDMF, you can't go past 255, because that value is written as a single byte. So any multiple of 256 is removed. In other words, 1000 in hexadecimal representation is 3E8, which would need two bytes to be represented: one with 03, the other with value E8. But only the least significant byte gets written, so you don't have 3E8 but just E8. And E8 in decimal is 232. (In a more mathematical way, 1000/256 = 3, with a remainder of 232.)

So you need to give your script a number lower than 1000. For example, 232 since that's what your map expects.

Old Post 06-04-10 14:40 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Swec
Junior Member


Posts: 127
Registered: 08-09


ohh it is that easy? i just set 1000 .

ohh i forget Doom in ZDoom

EDIT: I tried some other tags/ script numbers but i get same error. it just change the numbers.

Old Post 06-04-10 14:53 #
Swec is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
boris
meow


Posts: 3629
Registered: 05-00


That script shouldn't even compile.

code:
Thing_projectile(random 141,163),127, 90, 0, -100);


should be something like

code:
Thing_projectile(random(141,163),127, 90, 0, -100);

Old Post 06-04-10 16:57 #
boris is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Swec
Junior Member


Posts: 127
Registered: 08-09


Thanks.

But i still got the same problem.
The script complies whiteout errors.

i can't figure out what is wrong. most be something in my WAD that gives errors. :(

Old Post 06-04-10 23:33 #
Swec is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11204
Registered: 07-07


As I said:

code:
#include "zcommon.acs" script 232 (VOID) { //Alarm player of artillery request Print(S: "INCOMING ARTILLERY!"); //The Text message that is displayed. //Short Delay Until artillery begins. Delay(130); //Lanch Artillery for(int i = 0; i < 30; i++ ) { delay(35); // Time between projectiles Thing_projectile((random 141,163),127, 90, 0, -100); }


Since you're using Doom in Hexen format, you cannot use a script number higher than 255! 1000 is too much, so the map substract 768 (3*256) from it and instead of calling script 1000, it calls script 232.

Old Post 06-04-10 23:49 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 21:13. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Doom Builder > Script problems DB2

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.