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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Vertasea

Nice map, glad you got everything working on it :))
2 years ago
looks trippy, this is a map to play when you're super tired lol
2 years ago
Cool map my dood
2 years ago
sheeesh... that's a long hallway, but at least you added the mp-40 XD
2 years ago
As usual epic work SPi
2 years ago
Nice PaP in this map... looks familar xd
2 years ago
You can't make a prefab a script_model. It doesn't work like that. What you need to do is enter the bookcase prefab and select all of the models and make them a script_modle. You can do this by right clicking on the grid and hover over script then select script_model. Then you can give them a targetname. In script you would want to get an array of the models using GetEntArray and then you can move them.
4 years ago
Step one don't follow ZK tutorials lol he had some bad habits with scripting :)
================================================================

In radiant add a trigger_use give it this kvp
Code Snippet
cs
targetname - radio_trigger
Also give it this kvp ( radio1 is the sound alias name for the sound you want to play )
Code Snippet
cs
script_sound - radio1 
You can copy paste as many of these as you want and give them all different script_sound kvp's
SCRIPT:
Open mapname.gsc and thread this in main()
Code Snippet
cs
level thread get_radio_triggers();
At the bottom of mapname.gsc add this
Code Snippet
cs
get_radio_triggers() {

    trigs = GetEntArray("radio_trigger", "targetname");

    for( i=0; i < trigs.size; i++ ) {
        trigs[i] thread radio_trigger_setup();
    }
}

radio_trigger_setup() {
    radio_is_playing = false;
    self SetCursorHint("HINT_NOICON");
    self UseTriggerRequireLookAt();

    while(true) {
       
        self SetHintString("Press ^3&&1^7 to activate radio");
        self waittill("trigger", player);
        self SetHintString("This radio is currently playing");

        if(radio_is_playing == false) {
            radio_is_playing = true;
            self PlaySound(self.script_sound);
            wait(9); // sound playback time in seconds
            radio_is_playing = false;
        }
        else if(radio_is_playing == true) {
            self SetHintString("Another radio is currently playing!");
            wait(1.5);
        }
    }
}
Make sure you have your sound converted correctly if you have to just reconvert it if this doesn't work, I just tested it and it works 100%. If you have any questions please let me know.
 
4 years ago
 
======================================================================================
A SCRIPT
BY: VERTASEA
    ======================================================================================
ROTATE MULTIPLE ENTITIES
This script can handle multiple rotating ents.
======================================================
Features that can be set via kvp:
Choose rotation direction.
Set rotation speed.
Require power to rotate/ or rotate without power.
Play a looping sound on the rotating ent.


USES:
This script would be good to add to a map with ceiling fans, vent fans, or if you want props to rotate like the gif above.
If you want anything to rotate in your map this is a easy way to do it.

Instructions:

In Radiant add a script_model or a script_brushmodel.
Besure to look at the script doc within the script to see what all kvp to add to your script_model or script_brushmodel.


Thread this function inside of mapname.gsc in main() UNDER maps\_zombiemode::main();

Code Snippet
cs
// Rotate entitys
level thread get_rotate_ents();
Copy this and paste it at the bottom of mapname.gsc
Code Snippet
cs
/*============================== SCRIPT DOC BEGIN ==============================//

REQUIRED: "targetname" = "rotate_ent" // Must be a script_model or a script_brushmodel
REQUIRED: "script_noteworthy" = "DIR" // DIR = Direction  - Choose "pitch", "roll", or "yaw"

OPTIONAL: "script_transition_time" = "NUMBER" // NUMBER = Any number you want in seconds. Lower the number = faster rotation. Lowest number is 0.05
OPTIONAL: "script_string" = "needs_power" // Don't add this kvp if you want it to rotate when the game starts
OPTIONAL: "script_sound" = "sound_alias_name" // If you want a sound to play from the ent make sure it's 3D and LOOPING

//=============================== SCRIPT DOC END ===============================*/

get_rotate_ents() {

    e_models = GetEntArray("rotate_ent", "targetname");

    for(i = 0; i < e_models.size; i++) {

        e_models[i] thread handle_rotating_ents();
    }
}

handle_rotating_ents() {

    if(!isdefined(self.script_noteworthy)) {
        return;
    }
    if(isdefined(self.script_transition_time)) {
        time = self.script_transition_time;
    }else{
        time = 1;
    }
    if(isdefined(self.script_string) && self.script_string == "needs_power") {
        flag_wait("electricity_on"); // wait for power
    }
    if(isdefined(self.script_sound)) {
        self PlayLoopSound( self.script_sound );
    }
   
    while (true) {

        switch(self.script_noteworthy) {

            case "pitch":
                self RotatePitch(360, time);
                break;
            case "yaw":
                self RotateYaw(360, time);
                break;
            case "roll":
                self RotateRoll(360, time);
                break;
        }
        wait(time - .1);
    }
}

If you use this a credit would be appreciated thanks.
If you find any bugs or have any issues please let me know.
4 years ago
Try to add a pathnode at the top of the slant. - CLICK TO SEE EXAMPLE PIC

To add pathnode press B to open entity browser, then click on node and then drag in a pathnode.
Try that and let me know if that fixes it. Also make sure you don't have any perks under the sland, and also make sure there is no breaks in the geo
4 years ago
Loading ...