Post your scripting questions / solutions here
Moderator: Moderators
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Tue May 13, 2003 5:13 pm
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"
If you grab in toilets don´t wonder that your hands are brown.
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Tue May 13, 2003 5:30 pm
thx
i try to look through
If you grab in toilets don´t wonder that your hands are brown.
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Tue May 13, 2003 6:02 pm
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)
If you grab in toilets don´t wonder that your hands are brown.
tltrude
Chuck Norris
Posts: 4774 Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:
Post
by tltrude » Tue May 13, 2003 11:47 pm
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
}
}
Tom Trude,
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Wed May 14, 2003 6:06 am
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
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Thu May 15, 2003 8:37 pm
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
If you grab in toilets don´t wonder that your hands are brown.
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Fri May 16, 2003 6:20 am
it means:
1)there's no texture
2)shader is wrong
Live to map, not map to live.
-mohaa_rox, .map
moderator
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Fri May 16, 2003 6:55 am
The console will tell you what's wrong (look just below cm_loadmap).
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Sat May 17, 2003 1:55 pm
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?
If you grab in toilets don´t wonder that your hands are brown.
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Sat May 17, 2003 2:06 pm
Only usuable in FAKK2 I think
Quake doesn't have a scripting language
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Sat May 17, 2003 2:52 pm
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.
If you grab in toilets don´t wonder that your hands are brown.
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Sat May 17, 2003 3:11 pm
Maybe they removed the flag and spawned a different flag model instead?
You could also try a dynamic light
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Sat May 17, 2003 3:11 pm
UZZIEL, u're chinese?
Live to map, not map to live.
-mohaa_rox, .map
moderator
UZZIEL
Corporal
Posts: 39 Joined: Tue Apr 29, 2003 6:47 pm
Post
by UZZIEL » Sat May 17, 2003 4:17 pm
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
If you grab in toilets don´t wonder that your hands are brown.