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

Wrong perk reference

It's the specialty name you must use

Think for widows it's either

"Specialty_widowswine"

If not its

"Specialty_widows_wine"

Check the zm_perks gsh for the list

The other you've used is just a variable

I would just like to state that using PERK_WIDOWS_WINE will not affect the outcome. Also it is "specialty_widowswine" which is also defined by PERK_WIDOWS_WINE.

His problem was inside the loop.

Code Snippet
Plaintext
function shootables_done(player)
{
while(1)
{
self waittill(level.shootablesCollected >= level.shootablesNeeded);
 
if(level.shootablesCollected == level.shootablesNeeded)
{
players = GetPlayers();

for(i=0; i < players.size; i++)
{   
player[i] zm_perks::give_perk( PERK_WIDOWS_WINE, false );
}
}
break;
}
}

I have fixed the code so if you wish to replace the function you can do.

Also question for OP, out of curiosity why did you add a loop into shootables_done?
7 years ago
This error shows up when adding this to zm_mymapname.gsc:

What I posted will work fine as long as you haven't removed
Code Snippet
Plaintext
#using scripts\zm\_zm_utility;


However if this isn't the case you must have implemented it incorrect and from the error id assume you have misplaced the line(s) of code. If if none of this is the case could you possibly share your code?
8 years ago
idk that didn't seem to work and idk why

In no way is this the best way. Just a way that works for me.

Radiant crap (Put it into a spoiler if you know what your doing in Radiant)

Spoiler: click to open...
Step 1:
Go into Radiant Enity Browser->Script->model add it into your map


Step 2:
Select the script_model you have just placed and set the model via the Entity Info
At this point go ahead and also set the targetname to what you want to refer to the door as in the code in my case "door_example"


At this point you may want to keep track of any information such as the new origin/rotation of the model so that you don't have to guess inside your code.

Script crap

Several functions to move script_model if you are unsure how to:
Spoiler: click to open...
Taken directory from the /docs_modtools/scriptapifunctions.htm

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> MoveTo(<point>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <point> The point to move the entity to
[MANDATORY] <time> The time to move the entity in seconds
[OPTIONAL] [acceleration time] The time spent accelerating
[OPTIONAL] [deceleration time] The time spent decelerating
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Move this entity to the given point.
EXAMPLE: dummy MoveTo( dest_org, .5, .05, .05 )

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> MoveX(<point>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <point> The x value to move the entity to, as a floating point number
[MANDATORY] <time> The time to move the entity in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Move this entity to the given world x value
EXAMPLE: train MoveX( -4400, 60, 15, 20 )

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> MoveY(<point>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <point> The y value to move the entity to, as a floating point number
[MANDATORY] <time> The time to move the entity in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: move this entity to the given world y value
EXAMPLE: hangardoor MoveY( 320, 10 )

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> MoveZ(<point>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <point> The z value to move the entity to, as a floating point number
[MANDATORY] <time> The time to move the entity in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Move this entity to the given world z value

Rotation

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> RotatePitch(<pitch angle>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <pitch angle> The new pitch angle in degrees
[MANDATORY] <time> The time to rotate in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given pitch
EXAMPLE: treeorg RotatePitch( -5, 0.26, 0.15, 0.1 )

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> RotateTo(<angles>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <angles> The new world angle to rotate to
[MANDATORY] <time> The time to rotate in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given world rotation value
EXAMPLE: shutter RotateTo( (shutter.angles[0], newYaw, shutter.angles[2]), newTime )

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> RotateVelocity(<rotate velocity>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <rotate velocity> The rotational velocity to rotate
[MANDATORY] <time> The time to rotate in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity at a particular velocity for a given time
EXAMPLE: self RotateVelocity( (x,y,z), 12 )

Code Snippet
Plaintext
void <script_model, script_origin or script_brushmodel> RotateYaw(<yaw angle>,<time>,[acceleration time],[deceleration time])

[MANDATORY] <yaw angle> The new yaw angle in degrees
[MANDATORY] <time> The time to rotate in seconds
[OPTIONAL] [acceleration time] The time spent accelerating in seconds
[OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given yaw

There are most definitely more functions but these are just the main ones id look into using for this.

So after deciding which function is right for you go ahead
Now in this example I'm going to be using MoveX as I am only moving it along the X axis.

Code Snippet
Plaintext
function monitorDoorEvent() {
//Grabs the script_model we placed inside out map
door = GetEnt("door_example", "targetname");

//Waits for the notify or you can just remove this and run the script when ready.
level waittill("event_door_move");

//Moves the door along the X axis from initial point to 852.25 it will take it 1 second to do so.
door MoveX(852.25, 1); //MoveX(pointX, time), MoveTo(newOrigin, time)
}

Essentially this is just the exact same as what IVIr_Gadd suggested but just going over the Radiant parts.  :lol:

If you followed it right your door should move like such (Sorry about music I forgot that nvidia shadow play picks up that crap):
Spoiler: click to open...
:(
We're sorry.
The embdedded media couldn't be retrieved.
View reason
The response was empty.
View media in new tab
8 years ago
Code Snippet
Plaintext
//From _zm_powerups.gsc
//specific_powerup_drop( powerup_name, drop_spot, powerup_team, powerup_location, pickup_delay, powerup_player, b_stay_forever )

//Example use? I guess
level thread zm_powerups::specific_powerup_drop("full_ammo", origin);
8 years ago
How do you increase zombie health per round?

If it is currently possible, the zombies need to gradually gain extra health.

Code Snippet
Plaintext
// set_zombie_var( zvar, value, is_float, column, is_team_based )
zombie_utility::set_zombie_var("zombie_health_increase", 100, false); //cumulatively add this to the zombies' starting health each round (up to round 10)
zombie_utility::set_zombie_var("zombie_health_increase_multiplier", 0.1, true); //after round 10 multiply the zombies' starting health by this amount

Or

Code Snippet
Plaintext
//If team based
level.zombie_vars[team][zvar] = value;

//If not
level.zombie_vars[zvar] = value;
8 years ago
Loading ...