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 - Chadric273

I think there are problems moving structs because they don't have a body (Atleast I couldn't use them). However if you have an entity you are able to move it to a direction.

How to use MoveTo?
Wall = getEnt("walldoor", "targetname");
Wall MoveTo( Wall.origin + (200, 200, 0), speed);

This should be the same as in cod waw?
 Hello! Thank you for replying to my post! I don’t think my question was very clear. I was wondering if there was a way so that I could place a script struct in one location, and then place a second script struct in a different location, and then script it so that a different entity moves from the first script struct to the second one.
5 years ago
Question for you all, how would I go about scripting something so that I can make it move from one script_struct to the next? I know there moveTo functions and such and I tried making them work using a script struct, but I could not get it to work. Anyone that can help me with this?
5 years ago
That's true, but the point is that 'self' can be anything, it's simply the variable/entity that called that function
 Hey guys! Really appreciate you guys clarifying that for me. It makes a lot more sense now. If you don’t mine me bothering you with one more question, when is it best to use “level”, “player”, or just threading the next function without anything in front of “thread blah blah blah”?
5 years ago
Use this:
Code Snippet
Plaintext
self disable_trigger();

wait 15; // counter

self enable_trigger();
 Thanks! I really appreciate you helping me out! Just curious, what does"self" exactly do in terms of scripting? I've seen it used before, but I don't fully understand how it works.
5 years ago
Hey guys! I'm sure this is a simple thing to script, but I am lost as how to do it. How would one script it so that when I press "F" on a trigger, it will temporarily be unavailable to use until the script for that trigger has run? Example:

I press "F" on a trigger and it turns on a trap. While the trap is running I want the trigger to be unavailable and to have it give no indications of being able to press "F" (it will no longer say press F for blah blah, instead it will saying nothing) until the trap has finished running. Once the trap has finished running I then want the trigger to be able to be used again and to say "Press F to use".

I know how to change the hint icon for the trigger, but what I am mostly wondering is how to make the trigger temporarily unavailable. Any help would be much appreciated!
5 years ago
Hey guys! I'm sure this is something simple, but how would I go about writing in my script so that step two of the EE cannot be accessed until step one is completed?
5 years ago
Code Snippet
Plaintext
trig = getEnt("nothing","targetname");

while(1)
{
        trig waittill("trigger", player);
        weapon = player getcurrentweapon();
        if(weapon == "bowie")
        {
            // do stuff
            break;
        }
        wait(1);
}
This is how you can do it in Cod World at War
 I shall give this a shot and let you know if it worked for bo3 (:
 
 
 
 
5 years ago
I don't know how it works in bo3 but I know how to do it in waw.

In code you have to get the trigger, when the trigger fires you have to check which weapon that player is holding. If it is the weaponName bowie knife you can let him do the rest of the code.
 
 Okay, what you are saying makes sense however my knowledge on how to write code isn't the greatest. What would a line of code look like that would "check  which weapon the player is holding"?
 
5 years ago
Hey guys!

Question is as the title says it. I was wondering how to write a line of script that makes it so you have to use only the bowie knife in order to enable a trigger damage? I am wanting the player to have to cut a chord in the map, but I want it so that only the bowie knife can cut the chord. Any help would be much appreciated!
5 years ago
Yo, Did you ever get this fixed?
Im guessing you have made sure you have checked the light tick box before rendering the map?

I was wondering because im having same/similer problem. The lights I made at first show up but then I have added some more and they dont show when i test my map and its annoying me and i dont want to have to start over cos of such a simple issue.
Hey! I thought I would respond to about this, I updated my post with the solution to my problem. Basically I had the sunbox set to default_day instead of zm_factory. The daylight was too bright for fire fx to show up so by switching it to zm_factory it turned it to night time, wich made it dark enough for the fire fx's light to actually appear. Hopefully this helps!
 
5 years ago
Thank you for your reply! I'll be sure to give this a try when I get the next chance (:
5 years ago
Hey guys! So I wrote  a script where you can destroy a wall by hitting a trigger_damage with an explosive that will then allow zombies to walk through it. The problem I am having is the zone that I want players to be able to access after being destroyed needs to be "turned on" somehow. Typically with a zombie_door you would use a script_flag kvp. I tried putting that KVP on my trigger_damage but it didn't work. Is there someway to "turn on" the zone through scripting that way once the wall is destroyed the script will then follow it up with turning on the next zone? Any help will be much appreciated!
5 years ago
There is not really a "place" where to learn scripting. I have been modding since 2015 so that's about four years. And I still struggle with the easiest things from time to time.

I find it useful to read the scripts we were given with the mod tools, since they have pretty much all types of scripts there. For example if you're creating a custom wonder weapon, there are the scripts for Ray Gun Mark III and Thundergun. Treyarch has also provided a scripting api with all the engine functions of gsc scripting, which can be found in BO3 root/deffiles/docs_modtools

Most WaW scripts are also relevant in BO3, so you can also learn from the tutorials other have posted on UGX and other forums (even when most of them are for WaW).

And the best advice is that do what you're currently doing, which is try to do it yourself first. Other people are more likely to help you if you have tried it yourself first, which is exactly the case here :)
I really appreciate your advice! I think looking at the scripts provided to us along with using the API will definitely help me out even more. Again, thank you so much for all of your help! Stay awesome my friend! 
5 years ago
Hey guys! Just as the title says, I am wondering how to make it so that something in my script does not happen until a certain round has been passed. I am sure it is something simple, but I am newer to scripting so I am unsure how to do this. Any help is much appreaciated!
5 years ago
I actually figured out an easier way to do what you want. I know it might look complicated but this way you don't have to use any triggers.
Code Snippet
Plaintext
function destroy_wall()
{
wall = GetEnt( "destructible_wall" , "targetname" );
if(!isdefined(wall))
{
IPrintLnBold("NO WALL FOUND! Check KVPS");
return;
}
wall SetCanDamage( true );//This allows script models to respond to damage without trigger

wall_trigger_hint = Spawn( "trigger_radius", wall.origin, 0, 64, 64 ); //Spawn a trigger radius on the wall, that displays the hintstring
wall_trigger_hint SetHintString( "This wall looks weak..." );
wall_trigger_hint SetCursorHint( "HINT_NOICON" );

while(1)
{
wall waittill( "damage", amount, attacker, direction_vec, point, type, tagName, ModelName, Partname, weapon ); //Model waits for damage
if(IsPlayer(attacker) && (type == "MOD_EXPLOSIVE" || type =="MOD_PROJECTILE" || type == "MOD_PROJECTILE_SPLASH" || type == "MOD_GRENADE" || type == "MOD_GRENADE_SPLASH") ) //Check if the damager is the player and that it's explosion damage
{
IPrintLnBold ( "The wall has been destroyed." );
                        //Add some stuff here if you want, has to be above the "break"
break;
}
}

wall Delete();
}
If the hintstring radius is not big enough, you can change the radius of the trigger here:
Code Snippet
Plaintext
wall_trigger_hint = Spawn( "trigger_radius", wall.origin, 0, 64, 64 );
//Change the last two numbers (64, 64) if you want to increase/decrease
//the distance of when the hintstring appears
Hey! Thank you for getting back to me again! I haven't been able to test out your script yet, but it looks awesome! I actually managed to figure out why your original suggestion wasn't working and it turns out I simply spelt destructible wrong in a line of code haha. Question for you though, how and where did you learn how to script some of this more complex stuff for BO3? As you can see I am a rather amateur scripter, but I would love to learn how to do more complex scripting like you did above. 
5 years ago
Loading ...