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

Perk drinking animation

broken avatar :(
Created 12 years ago
by Ege115
0 Members and 1 Guest are viewing this topic.
1,707 views
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
Hello fellow UGX members!

I am adding stuff to a custom script, and I am trying to make so when you hit a trigger, the player will do the perk drinking animation as I think most people here have seen I suppose. But the scripts purpose is of course not to just do that animation. But this is were I am at the script right now.

And I looked in _zombiemode_perks.gsc and I found this,

Code Snippet
Plaintext
// do the drink animation
gun = player perk_give_bottle_begin(perk);
player.is_drinking = 1;
player waittill_any( "fake_death", "gungame_death", "death", "player_downed", "weapon_change_complete" );

// restore player controls and movement
player perk_give_bottle_end( gun, perk);
player.is_drinking = undefined;
// TODO: race condition?
if ( player maps\_laststand::player_is_in_laststand() )
{
continue;
}

//player thread perk_vo("specialty_armorvest");
player setblur( 4, 0.1 );
wait(0.1);
player setblur(0, 0.1);
//earthquake (0.4, 0.2, self.origin, 100);

So I added that after the line were you activate the trigger, but when I launch the map, I get a unitilised variable error 'perk'

And what I have experienced when that error happens for 'player' instead of 'perk' then you will normally have to add

Code Snippet
Plaintext
player = get_players

But in my case for perks, I don't know what line you will have to put instead. Someone who knows and can tell me?

Thanks in advance.  :)
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
Perhaps because you only added the bottle to one of the functions?
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
Quote
Perhaps because you only added the bottle to one of the functions?

I feel stupid now, but what do you mean with "one of the functions"?

 
Loading ...