Page 2 of 3

Posted: Fri Aug 13, 2004 2:52 pm
by MasterMind
Yes, that may be the reason why it didnt work the other time :)

Make sure you did what tltrude said GARRAPIGNADO. :wink:

Posted: Fri Aug 13, 2004 6:05 pm
by GARRAPIGNADO
Hi again.

I have some news: I have a problem to run the script.

I put the bsp and the scr into a working pk3 (with another map inside it). The mapa_base script didnt load, but the other did.

I believe that there's no problem with the names, cause they are very simple!!! :( :( :(

I test the script with

setcvar "g_obj_alliedtext1" "TEST"

but it didnt work, so, there is a basic problem of scripting, not in your methods.

It must be so basic that I'm can't find it :D

I tried including
level.script = maps/dm/mapa_base.scr
but it doesnt work.

I surrender. It's silly, but I can't find it :cry: :cry: :cry:

If anyone wants to help me, mailme to garrapignado@hotmail.com, and I'll send him the pk3. It's around 5kb, not big, jejejeje.
But I repit: only if want.

Thanks all. I'll keep asking and answering if I can! :D :D :D :D

Posted: Fri Aug 13, 2004 7:53 pm
by MasterMind
What is your maps name?

Posted: Fri Aug 13, 2004 8:30 pm
by GARRAPIGNADO
mapa_base.bsp

And the script is mapa_base.scr

Both in a pk3 with the subfolders maps/dm. Nothing else.

Posted: Fri Aug 13, 2004 8:47 pm
by MasterMind
Hmmm, I really dont know whats wrong :(

Do you use MBuilder as a compiler?

Posted: Fri Aug 13, 2004 9:22 pm
by GARRAPIGNADO
Yes, I did.

And pakscape to pk3.

It's strange! :D

Posted: Fri Aug 13, 2004 9:32 pm
by MasterMind
In MBuilder go into "Other Options" and make sure there is a check in the "Copy BSP to map directory after compile." box. :D

Posted: Fri Aug 13, 2004 10:53 pm
by bdbodger
If there is an error in the script the script won't run . What do you have in the console any errors ? Maybe type logfile 1 into the console before you run the map then post the error from qconsole.log that is in main .

Posted: Fri Aug 13, 2004 11:03 pm
by MasterMind
You should try what bdbodger said, open up the console and look for errors :D

Posted: Sat Aug 14, 2004 10:26 am
by GARRAPIGNADO
Yes, I have done the logfile 1, but there isn't any visible error.

All the lines are about ubersound and precache.
Only a strange line: R_LevelMarksLoad: maps/dm/mapa_base.dcl not found

But I don't knows what it is.

The problem is that I have other scripts made by me and running well. And this one, worked with other things (a plane, for example), but now not.

Posted: Sat Aug 14, 2004 10:53 am
by GARRAPIGNADO
Hey guys!!! I've found something. This code doesn't work (the message doesn't show):

Code: Select all

main:

setcvar "g_obj_alliedtext1" "SCRIPT TEST" 

level waittill spawn 

thread boxDrop 

end

boxDrop: 

$switch wattill trigger
$switch nottriggerable
$box physics_on
$box waittill touch
$box explode 100 // or use radiusdamage 

end
But this one, shows the message:

Code: Select all

//TEST MAP
//BY GARRAPIGNADO[&Co]
//

main:

setcvar "g_obj_alliedtext1" "SCRIPT TEST" 

level waittill spawn


end

So, the problem is in the dealing of the boxDrop subrutine. I tried with the three you gave me.

(We're near the solution) :D :D

Note: anyone of my other scripts uses threads

Posted: Sat Aug 14, 2004 11:44 am
by GARRAPIGNADO
A silly question:

Is the same if I write in this two ways??

Code: Select all

main: 

setcvar "g_obj_alliedtext1" "SCRIPT TEST" 

level waittill spawn 

thread boxDrop 

end 

boxDrop: 

$switch wattill trigger 
$switch nottriggerable 
$box physics_on 
$box waittill touch 
$box explode 100 // or use radiusdamage 

end
And:

Code: Select all

main: 

         setcvar "g_obj_alliedtext1" "SCRIPT TEST" 

level waittill spawn 

         thread boxDrop 

end 

boxDrop: 

           $switch wattill trigger 
           $switch nottriggerable 
           $box physics_on 
           $box waittill touch 
           $box explode 100 // or use radiusdamage 

end
It's only a visual thing, isn't it??

Posted: Sat Aug 14, 2004 1:02 pm
by bdbodger
$switch wattill trigger

should be

$switch waittill trigger

Posted: Sat Aug 14, 2004 1:34 pm
by MasterMind
Yes!! bdbodger solved the problem. Change that and its sure to work :D

Posted: Sat Aug 14, 2004 1:50 pm
by GARRAPIGNADO
Oh, thanks bdbodger, that's one of the mistakes, but not the only one :cry:

See this. I have disconnected the lines (with //) and then, I have delete a // each time and test the map.

With this code, it show the text:

Code: Select all

main:

setcvar "g_obj_alliedtext1" "SCRIPT TEST" 

level waittill spawn
	thread box_drop 

end 

box_drop: 

//	$switch waittill trigger 
//	$switch nottriggerable 
//	$box physics_on 
//	$box waittill touch 
//	$box explode 100 // or use radiusdamage 

end
But, with this one, doesn't show:

Code: Select all

main:

setcvar "g_obj_alliedtext1" "SCRIPT TEST" 

level waittill spawn
	thread box_drop 

end 

box_drop: 

	$switch waittill trigger  <----see this line
//	$switch nottriggerable 
//	$box physics_on 
//	$box waittill touch 
//	$box explode 100 // or use radiusdamage 

end
The solution is a bit nearest thanks to your help!!! :D :D :D :D