Page 1 of 2
textures n triggers
Posted: Tue May 13, 2003 5:13 pm
by UZZIEL
HI!
Is ist possible to change textures of brushes by using a trigger?
If it is - then how?
thx
ps.
Sorry if this is a thread for mapping since i dont know how to solve my prob i just decided to post it at "Scripting"

Posted: Tue May 13, 2003 5:18 pm
by jv_map
Yes it is possible if your shader has the fromEntity keyword. There's even an example here:
http://www.ritualistic.com/games/fakk2/ ... anual.html
Look right at the very bottom of the document.
Posted: Tue May 13, 2003 5:30 pm
by UZZIEL
thx
i try to look through

chinese :?:
Posted: Tue May 13, 2003 6:02 pm
by UZZIEL
some questions:
1. what is a B-Model
2. whats ment by <fromEntity> -> where/ how to use it
3. if there is fromENTITY then a entity has to be used for this?
Practically:
I build up a brush called "box" - > give it a texture called "face1"
->some values must be set equal with that texture "face1"
i build up a trigger reacting at bullets "boxtrigger"
-> the trigger is informed about that value and changes it at hit to the next one
i hit that trigger -> the texture on the box changes to "face2"
-> the trigger changes the value of "face1" to the value of "face2"
if i hit again it changes to "face3" and so on...
hmh
with that example i didnt understood much - only that there are some commands/keys reacting with shaders. (maybe a language prob)
Movie shader
Posted: Tue May 13, 2003 11:47 pm
by tltrude
I don't know if this will help, but it is an example of a texture changing brush. Make a shader using the below text and apply the texture it to a worldspawn brush. After you compile, test the map and you will see the movie (slideshow) playing on the brush.
Code: Select all
textures/custom/my_movie
{
qer_editorimage textures/mohmenu/briefing/briefing3a.tga
qer_keyword special
nomipmaps
nopicmip
cull none
surfaceparm carpet
surfacelight 2000
{
animMap .15 textures/mohmenu/briefing/briefing3a.tga textures/mohmenu/briefing/bootcamp.tga textures/mohmenu/briefing/airborne.tga textures/mohmenu/briefing/bombers.tga textures/mohmenu/briefing/portphoto.tga textures/mohmenu/briefing/invasionfleet.tga textures/mohmenu/briefing/shoreguns.tga textures/mohmenu/briefing/convoy.tga textures/mohmenu/briefing/battleship.tga textures/mohmenu/briefing/higginsboat.tga textures/mohmenu/briefing/depot.tga textures/mohmenu/briefing/omahalanding.tga textures/mohmenu/briefing/defeat.tga textures/mohmenu/briefing/mannon.tga
rgbgen global
blendFunc GL_DST_COLOR GL_ZERO
}
{
animmap .15 textures/mohmenu/briefing/briefing3a.tga textures/mohmenu/briefing/bootcamp.tga textures/mohmenu/briefing/airborne.tga textures/mohmenu/briefing/bombers.tga textures/mohmenu/briefing/portphoto.tga textures/mohmenu/briefing/invasionfleet.tga textures/mohmenu/briefing/shoreguns.tga textures/mohmenu/briefing/convoy.tga textures/mohmenu/briefing/battleship.tga textures/mohmenu/briefing/higginsboat.tga textures/mohmenu/briefing/depot.tga textures/mohmenu/briefing/omahalanding.tga textures/mohmenu/briefing/defeat.tga textures/mohmenu/briefing/mannon.tga
rgbgen identity
blendfunc GL_ONE GL_ONE
}
}
Posted: Wed May 14, 2003 6:06 am
by jv_map
Well you'll need frameFromEntity in this case, but I'm not sure if mohaa actually supports this. The keyword should be placed in the animMap stage.
Example:
Code: Select all
textures/custom/my_movie
{
{
animMap .15 textures/mohmenu/briefing/briefing3a.tga textures/mohmenu/briefing/bootcamp.tga
frameFromEntity
}
}
Then in your script type something like this:
Code: Select all
$trigger waittill trigger
$box shader frame 2 // switch to next frame
hmh
Posted: Thu May 15, 2003 8:37 pm
by UZZIEL
I tried it with other textures on a smoll tryout box.
the only thing happenz is a gray square with a yellowgreen frame ?!?
hmh
whats wrong??
thx
Posted: Fri May 16, 2003 6:20 am
by mohaa_rox
it means:
1)there's no texture
2)shader is wrong
Posted: Fri May 16, 2003 6:55 am
by jv_map
The console will tell you what's wrong (look just below cm_loadmap).
Posted: Sat May 17, 2003 1:55 pm
by UZZIEL
it shows it doesnt know command "framefromentity" i used your example.
Maybe it needs some additions?
when i remove it alls ok but not triggerable anymore
hmh
maybe only useable for quake not in mohaa?
Posted: Sat May 17, 2003 2:06 pm
by jv_map
Only usuable in FAKK2 I think
Quake doesn't have a scripting language

Posted: Sat May 17, 2003 2:52 pm
by UZZIEL
k thx Dr. JV
- how is it used for flags?
there is a map i think push city hall?!? where the flags at triggerin change their colour/sign -> texture? . Is this only reserved for flags or global usable anywhere ? - when its possible plzzzzz tell me how.
Im standing still at one point with my map its some kinda frustrating.
I could also use multiplesided circle with different textures which turns one side up/down each time the trigger is used - but this seems
a little bit unprofessional i think.
Posted: Sat May 17, 2003 3:11 pm
by jv_map
Maybe they removed the flag and spawned a different flag model instead?
You could also try a dynamic light

Posted: Sat May 17, 2003 3:11 pm
by mohaa_rox
UZZIEL, u're chinese?
Posted: Sat May 17, 2003 4:17 pm
by UZZIEL
ahahahaha
rox
ahahahaha
no im german/polish
can speak both perfect - but english abut 50%
so sorry but thats the way to learn it for me