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

Moving a perk

broken avatar :(
Created 6 years ago
by Doodles_Inc
0 Members and 1 Guest are viewing this topic.
1,203 views
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
Signature
if I surprised you, it was because you underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
So my idea is to have a perk stuck somewhere in my map and when I shoot it, it falls down for instance, the problem is, the perks prefabs are composed of script_structs and lights, wich IDK how to move, I have tried this:
Code Snippet
Plaintext
function staminup() {
trigger = GetEnt("stamintrig", "targetname");
trigger waittill("trigger", player);
trigger Delete();
IPrintLnBold("Staminup");
staminuperk = GetEntArray("stamin", "targetname");
foreach (stamin in staminuperk) {
stamin MoveZ(-235, 1);
IPrintLnBold("Stamin");
}
staminuperkstructs = struct::get_array("stamin", "targetname");
foreach (stamin in staminuperkstructs) {
stamin MoveZ(-235, 1);
IPrintLnBold("Staminstructs");
}
IPrintLnBold("Staminup moved");
}
None of the print statements in the foreach loops execute, neither does the perk move, any ideas?
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
a struct is not an entity, you cant move it or do anyhing with it except store some kvps basicly.
Think you can change the origin by just setting it, but using a function like move() or w/e wont work for structs..

You would have to find a way to work around that, spawn a script_origin and/or or replace them in radiant and adapt the scripts to work with those for example.

Not sure why it doesn't print at all, dont have any basic bo3 knowledge to tell if it's kvp's or something.. If i recall correctly using 'getentarray' on a single ent in waw would cause a script-error. Not sure if it would actually prevent the array from being created though, and if that's also the case in bo3..

 
Loading ...