Scripting: Nade triggering Light
Moderator: Moderators
Scripting: Nade triggering Light
Here is what i want to do (its a small screw around map that i made for a friend..), i made a soccer net and i want it so that when a nade is thrown into the net, a goal-light will flash.
How might i rig this up? Thanks.
How might i rig this up? Thanks.
.:c|H|EE|TO|H|s|:.

Need a thorough map tester? Shine the Cheetohs signal!

Need a thorough map tester? Shine the Cheetohs signal!
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Look, I'm not very good (AT ALL) at scripting. I know nothing more than how to script a rotatingdoor, and even that i screw up on half the time!
, I'm sorry if you consider this 'spamming' but what you said did not help me much. But thanks anyway for the impatient, somewhat-rude.. reply.
.:c|H|EE|TO|H|s|:.

Need a thorough map tester? Shine the Cheetohs signal!

Need a thorough map tester? Shine the Cheetohs signal!
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Geez... It has very little to do with scripting! Go to the entity properties, set the right spawnflags, in the script put a $grenade_trigger waittill trigger and then the light stuff! As for the light, don't tell me you don't know how to do it and where to look - it has been mentioned a thousand times! See any switchable light tutorial and you're going to know the drill...
And FFS PLEASE - develop a skill of finding a solution on your own...
<EDIT>Sorry for rudeness, but it's really annoying when someone asks a question without even trying to find a solution in all available sources... I think I've picked this up at Linux forums,
where you get flamed and RTFM-ed everytime you ask about something which is very obvious to the others.
I learnt that asking the other people for help and spamming the forums should be the last resort thing. I know I tend to break this rule, too, but I really try to improve on that point. 
And remember: Use Google, Luke!
Google is your friend...</EDIT>
And FFS PLEASE - develop a skill of finding a solution on your own...
<EDIT>Sorry for rudeness, but it's really annoying when someone asks a question without even trying to find a solution in all available sources... I think I've picked this up at Linux forums,
And remember: Use Google, Luke!
it's brning in here...
ok Cheetohs, you have your net, make the light, just use a regular light entity for the light, give it a $targetname of goalLight1. now make a triger_multiple inside it, and hit "N" (for eNtities), now tick the checkbox marked PROJECTILES. now put in the key/value box $targetname - goalTrig
got it so far? yay!
and put this thread in the script.
Code: Select all
goalLight:
level.doTheLight = 1
while(level.doTheLight == 1)
{
$goalLight1 hide
$goalTrig waittil trigger
$goalLight show
wait 5
$goalLight hide
}
endCode: Select all
thread goalLightModerator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
you cannot trigger a light entity(from my knowledge). The light is COMPILED into the map so therefore you cant do that. I think you have to use an fx/dummy.tik and do some trick with it.... mayb you need to pay it a dollar
(lame joke)
(im searching for that old topic i asked.. or was it in the mapping forum
)
(im searching for that old topic i asked.. or was it in the mapping forum
Krane and I did an easy way for kind of triggering a light in containerz: we did show/hide brushes with a custom texture:this might be fine for u too?! It isn't really 'shining' but looks burning atleast.
too bad, the mapping forum is absent (still thinking positive). there was a thread of mine called flickeing torch or dunno, where we (jv mostly) did a flickering light. This would be exactly what u need! Maybe i'll find something on my hdd...
Code: Select all
textures/mgturret/leucht_blue
{
qer_editorimage textures/mgturret/leucht_blue.tga
surfaceparm nomarks
q3map_surfacelight 10000
{
map $lightmap
rgbGen identity
}
{
map textures/mgturret/leucht_blue.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/mgturret/leucht_blue.tga
blendfunc GL_ONE GL_ONE
}
}
too bad, the mapping forum is absent (still thinking positive). there was a thread of mine called flickeing torch or dunno, where we (jv mostly) did a flickering light. This would be exactly what u need! Maybe i'll find something on my hdd...
eureka! I found jv's demo map!
The light there is flickering and would be easy to switch on and off! bad thing was that this light shines through walls (there's a bright circle on the back of the wall where the light is), because the light doesn't recognize the wall and the compiler doesn't know the light
But this is prob no prob for u, is it?
here u are: jv's light.pk3. It got map, bsp (SP) and script. all u need!
Or:
Here's the script
The light itself is a script_model with targetname 'light' and a model 'lights/lightbulb_caged.tik'
The light there is flickering and would be easy to switch on and off! bad thing was that this light shines through walls (there's a bright circle on the back of the wall where the light is), because the light doesn't recognize the wall and the compiler doesn't know the light
here u are: jv's light.pk3. It got map, bsp (SP) and script. all u need!
Or:
Here's the script
Code: Select all
main:
level waittill spawn
// run thread for all lights
for(local.i = 1; local.i <= $light.size; local.i++)
$light[local.i] thread flicker
end
flicker:
self light 1 0.8 1 128
while(1)
{
wait (randomfloat 0.5)
self lightRadius (randomfloat 128)
waitframe // don't change the light within one frame
}
end- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm





