UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Hidding/showing brushes

broken avatar :(
Created 12 years ago
by sethnorris
0 Members and 1 Guest are viewing this topic.
3,760 views
broken avatar :(
×
broken avatar :(
Location: es
Date Registered: 15 August 2013
Last active: 7 years ago
Posts
161
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Mapper
My Groups
More
Signature
Enjoy my work? Feel free to donate here to support me

Wanna become a Patron? Try my Patreon Page
×
sethnorris's Groups
Mapper Has released one or more maps to the UGX-Mods community.
sethnorris's Contact & Social Links
The question is simple, I'm trying to make that when a trigger is activated a brushmodel with certain KVP dissapears and another brushmodel placed in the same location shows. The thing is to get that once a second trigger is activated, the hidden brushmodel shows and the showed one dissapears again, so the process can be repeated.

I know that I can get this by using the hide() and show() functions, but I don't know exactly how. If we collaborate we can make a tutorial so people can get on/off brushmodels etc.

Also, and it's a second question I wanted to know how to assign a scrolling material in radiant. If it can just be made by asset manager and saving it a scroll and then puting it on radiant as a custom texture or what. Thanks a lots. ;)
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
I can help you, but first I want to ask you do you want the brush to be like a door, like you can go through it after you have activated the trigger? Because "what I have experienced is" is that yes the brush do hide and you can not see it but the clip itself is still there so you can't go through it when the brush will hide. So the first thing that I want to know before I help you is, will it represent to be a door? And is it okay if you can have so the brush will move instead of hide? You can decide how quick the brush will move so if you want it to be very fast it may look like that it disappeares.
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 7 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
for the scrolling material you just set it as scrolling in asset manager and it will move when in game :3 haha
broken avatar :(
×
broken avatar :(
Location: es
Date Registered: 15 August 2013
Last active: 7 years ago
Posts
161
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Mapper
My Groups
More
×
sethnorris's Groups
Mapper Has released one or more maps to the UGX-Mods community.
sethnorris's Contact & Social Links
I'm trying to make the teleporter cable from kino der toten. So, i'll make two cylinders, one with the scrolling texture, the other with a normal texture. So, when the kino_teleporter trigger is activated, the player sees the active cable, and when the player teleports, the default cable shows up again, so the players can see quickly if the teleporter is linked or not.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
I believe that the Show(); and hide(); functions are what you want. I'm not sure how your functions are going to look like, but to give you an idea on how to use them:

Code Snippet
Plaintext
wire_hide()
{
 wire = getEnt("wire", "targetname");
 while(1)
 {
   level waittill("trigger_used");
  wire hide();
 }
}
 

Last Edit: January 15, 2014, 08:05:05 pm by daedra descent
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Okey, then I maybe can help. So you already have the setup for kino style teleporters with the script and anything in the map?

Post Merge: January 15, 2014, 08:02:22 pm
Edit: I mean't everything, not anything.

Post Merge: January 15, 2014, 08:33:32 pm
Edit again: Okey Deadra basically said the same idea that I had so you just add both wires at the same location, just so the un-linked wire covers the whole wire with the scrolling texture. And then if you use the lines that deadra said the regular wire will hide so the wire with scrolling texture a showing. But if you want as you said to make so the un-linked wire are showing after you have used the teleporter to make it look like the wire is not linked to the teleporter again, you will have to add the line (whatever you name the wire)

Code Snippet
Plaintext
un_linked_wire show();

after the line that says in the teleporter script when the teleporter has been used, so it could look like.

Code Snippet
Plaintext
level waittill ("teleporter_used"); //whatever the names for the trigger and script_models have.
un_linked_wire show();

So ingame it would look like the wire has been deactivated because wire with scrolling texture has been covered with the un linked wire after the line that makes the wire to show.

Or you could do the opposite, make the linked wire to cover the un linked wire and then make the linked wire to hide before the teleporter trigger have been used, and then make so the wire shows up after the teleporter has been activated.
Last Edit: January 15, 2014, 08:33:32 pm by Ege115
broken avatar :(
×
broken avatar :(
Location: es
Date Registered: 15 August 2013
Last active: 7 years ago
Posts
161
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Mapper
My Groups
More
×
sethnorris's Groups
Mapper Has released one or more maps to the UGX-Mods community.
sethnorris's Contact & Social Links
this is from kino style teleporter script:
Code Snippet
Plaintext
main()
{
flag_wait("electricity_on");
thread teleport_room_fx();
while(1)
{
setHintVar(1);
level.kino_teleporter_trigger waittill("trigger");
level.kino_teleporter_trigger playsound("pa_buzz");
setHintVar(2);
level.kino_mainframe_trigger waittill("trigger");
level.kino_mainframe_trigger playsound("pa_buzz");
setHintVar(3);
while(1)
{
level.kino_teleporter_trigger waittill("trigger", who);
if(level.kts["teleport_cost"] == 0)
break;

if(who.score < level.kts["teleport_cost"])
{
who playsound("deny");
continue;
}
who playsound("purchase");
who maps\_zombiemode_score::minus_to_player_score( level.kts["teleport_cost"] );
break;
}
setHintVar(4);
level.kino_teleporter_trigger do_teleport();
setHintVar(5);
wait level.kts["teleporter_cooldown_time"];
}
}


Sethhintvar2 defines what should happen when the teleporter is linked. Sethintvar3 defines what should happen when users do teleport. So in Sethintvar2 We must add the showing of the scrolling one and hide it again in the sethintvar3.

What do you suggest?
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Oh okey if you say so then, I would do (I have not tested this but this is what I would try at first) I would make the script you gave me to llok like this.

Code Snippet
Plaintext
main()
{
    linked_wire = getent ("linked_wire","targetname");
    flag_wait("electricity_on");
    thread teleport_room_fx();
    while(1)
    {
        setHintVar(1);
        linked_wire hide();
        level.kino_teleporter_trigger waittill("trigger");
        level.kino_teleporter_trigger playsound("pa_buzz");
        setHintVar(2);
        level.kino_mainframe_trigger waittill("trigger");
        level.kino_mainframe_trigger playsound("pa_buzz");
linked_wire show();
        setHintVar(3);
        while(1)
        {
            linked_wire hide();
            level.kino_teleporter_trigger waittill("trigger", who);
            if(level.kts["teleport_cost"] == 0)
                break;
           
            if(who.score < level.kts["teleport_cost"])
            {
                who playsound("deny");
                continue;
            }
            who playsound("purchase");
            who maps\_zombiemode_score::minus_to_player_score( level.kts["teleport_cost"] );
            break;
        }
        setHintVar(4);
        level.kino_teleporter_trigger do_teleport();
        setHintVar(5);
        wait level.kts["teleporter_cooldown_time"];
    }
}

Again, this is untested so please make a backup of your kino der toten teleporter .gsc file before you tset this so if you get an error you can just paste over the correct backup file and then we maybe come up with an another sloution if this doesn't work. If it is wrong then maybe I have just typed wrong on what I added but yea, make a backup of the script and test and see.
broken avatar :(
×
broken avatar :(
Location: es
Date Registered: 15 August 2013
Last active: 7 years ago
Posts
161
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Mapper
My Groups
More
×
sethnorris's Groups
Mapper Has released one or more maps to the UGX-Mods community.
sethnorris's Contact & Social Links
Ok, here's the thing. First, Asset Manager won't let me scroll textures. I set it as Model Phong and now the option appears. However, the texture works, but is not scrolling. Maybe I have to copy more things into mod folder, not only the .iwi


The teleporter scripts works like this. With power off, the liked wire shows. When turned power on the liked wire disappears, when linked, does not come back... It's a progress however. I'll keep trying
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Oh, I am sorry, I mixed them together in the wrong order, sorry. Maybe try this?

Code Snippet
Plaintext
main()
{
    linked_wire = getent ("linked_wire","targetname");
    linked_wire hide();
    flag_wait("electricity_on");
    thread teleport_room_fx();
    while(1)
    {
        setHintVar(1);
        level.kino_teleporter_trigger waittill("trigger");
        level.kino_teleporter_trigger playsound("pa_buzz");
        setHintVar(2);
        level.kino_mainframe_trigger waittill("trigger");
        linked_wire show();
        level.kino_mainframe_trigger playsound("pa_buzz");
        setHintVar(3);
        while(1)
        {
            level.kino_teleporter_trigger waittill("trigger", who);
            linked_wire hide();
            if(level.kts["teleport_cost"] == 0)
                break;
           
            if(who.score < level.kts["teleport_cost"])
            {
                who playsound("deny");
                continue;
            }
            who playsound("purchase");
            who maps\_zombiemode_score::minus_to_player_score( level.kts["teleport_cost"] );
            break;
        }
        setHintVar(4);
        level.kino_teleporter_trigger do_teleport();
        setHintVar(5);
        wait level.kts["teleporter_cooldown_time"];
    }
}

If this doesn't work I really have to studying more about scripting.
Marked as best answer by sethnorris 12 years ago
broken avatar :(
×
broken avatar :(
Location: es
Date Registered: 15 August 2013
Last active: 7 years ago
Posts
161
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Mapper
My Groups
More
×
sethnorris's Groups
Mapper Has released one or more maps to the UGX-Mods community.
sethnorris's Contact & Social Links
I figured out by myself. Yeah, the power thing is fixed with your script, but I made a mistake, the second hide function should go in sethintvar(4) not the third, otherwise the wire won't come back. So, If I got the scrolling texture to work This is a completely win. For those interested, here's the wining script:

Code Snippet
Plaintext
main()
{
    linked_wire = getent ("linked_wire","targetname");
linked_wire hide();
    flag_wait("electricity_on");
    thread teleport_room_fx();
    while(1)
    {
        setHintVar(1);
        level.kino_teleporter_trigger waittill("trigger");
        level.kino_teleporter_trigger playsound("pa_buzz");
        setHintVar(2);
        level.kino_mainframe_trigger waittill("trigger");
        level.kino_mainframe_trigger playsound("pa_buzz");
level.kino_mainframe_trigger playsound("pa_audio_act_pad_all");
    linked_wire show();
        setHintVar(3);
        while(1)
        {
            level.kino_teleporter_trigger waittill("trigger", who);
            if(level.kts["teleport_cost"] == 0)
                break;
           
            if(who.score < level.kts["teleport_cost"])
            {
                who playsound("deny");
                continue;
            }
            who playsound("purchase");
            who maps\_zombiemode_score::minus_to_player_score( level.kts["teleport_cost"] );
            break;
        }
        setHintVar(4);
linked_wire hide();
        level.kino_teleporter_trigger do_teleport();
        setHintVar(5);
        wait level.kts["teleporter_cooldown_time"];
    }
}
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Oh alright then, I just added those lines there because you said that it was there were the logic in the script happened.

ah well glad it works for you.

 
Loading ...