A BOX DROPPED IN YOUR HEAD

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

Yes, that may be the reason why it didnt work the other time :)

Make sure you did what tltrude said GARRAPIGNADO. :wink:
Jesus built us a bridge, with 2 boards and 3 nails.
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post 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
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

What is your maps name?
Jesus built us a bridge, with 2 boards and 3 nails.
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post by GARRAPIGNADO »

mapa_base.bsp

And the script is mapa_base.scr

Both in a pk3 with the subfolders maps/dm. Nothing else.
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

Hmmm, I really dont know whats wrong :(

Do you use MBuilder as a compiler?
Jesus built us a bridge, with 2 boards and 3 nails.
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post by GARRAPIGNADO »

Yes, I did.

And pakscape to pk3.

It's strange! :D
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post 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
Jesus built us a bridge, with 2 boards and 3 nails.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

You should try what bdbodger said, open up the console and look for errors :D
Jesus built us a bridge, with 2 boards and 3 nails.
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post 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.
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post 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
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post 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??
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

$switch wattill trigger

should be

$switch waittill trigger
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

Yes!! bdbodger solved the problem. Change that and its sure to work :D
Jesus built us a bridge, with 2 boards and 3 nails.
User avatar
GARRAPIGNADO
Corporal
Posts: 49
Joined: Mon Aug 09, 2004 5:43 pm
Contact:

Post 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
CLAN LA COMPAÑIA (ESPAÑA)
www.clanlacompania.com

Image

MAPPING SECTION ;)
Post Reply