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

Quick question about zombie_point_of_interest

broken avatar :(
Created 9 years ago
by Dust
0 Members and 1 Guest are viewing this topic.
1,575 views
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
So I am scripting a trap that attracts the zombies(similar to the monkey bomb), and I was looking at the zombie_point_of_interest line in the monkey bomb script.

I believe the max_attract_dist is how much distance the zombies have to be away from the thing that you are tageting before the zombies gets attracted to it.(probably explained that poorly xD)
and the num_attractors is how many zombies can be targeted to a certain ent at one time.
but what does the third value mean, the long number?
Code Snippet
Plaintext
grenade thread create_zombie_point_of_interest( max_attract_dist, num_attractors, 10000 );

Also let me know if I am totally off with what the first 2 variables mean xD.
Last Edit: October 19, 2015, 11:08:01 pm by thezombiekilla6
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
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
Used to determine the best spot for whatever the "zombie_boi" array is from what i can tell.

Code Snippet
Plaintext
create_zombie_point_of_interest( attract_dist, num_attractors, added_poi_value, start_turned_on )

Code Snippet
Plaintext
	if( !isDefined( added_poi_value ) )
{
self.added_poi_value = 0;
}
else
{
self.added_poi_value = added_poi_value;
}

Code Snippet
Plaintext
ent_array = getEntArray( "zombie_poi", "script_noteworthy" );

Code Snippet
Plaintext
		dist = distanceSquared( origin, ent_array[i].origin );

dist -= ent_array[i].added_poi_value;

Code Snippet
Plaintext
		if( (!isDefined( curr_radius ) || dist < curr_radius) && dist < best_dist && ent_array[i] can_attract(self) )
{
best_poi = ent_array[i];
}

Code Snippet
Plaintext
	if( isDefined( best_poi ) )
{
// Override, currently only used for monkeys in the air.
if( isDefined( best_poi.attract_to_origin ) && best_poi.attract_to_origin )
{
position = [];
position[0] = groundpos( best_poi.origin + (0, 0, 100) );
position[1] = self;
}
else
{
position = self add_poi_attractor( best_poi );
}
}
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
Used to determine the best spot for whatever the "zombie_boi" array is from what i can tell.

Code Snippet
Plaintext
create_zombie_point_of_interest( attract_dist, num_attractors, added_poi_value, start_turned_on )

Code Snippet
Plaintext
	if( !isDefined( added_poi_value ) )
{
self.added_poi_value = 0;
}
else
{
self.added_poi_value = added_poi_value;
}

Code Snippet
Plaintext
ent_array = getEntArray( "zombie_poi", "script_noteworthy" );

Code Snippet
Plaintext
		dist = distanceSquared( origin, ent_array[i].origin );

dist -= ent_array[i].added_poi_value;

Code Snippet
Plaintext
		if( (!isDefined( curr_radius ) || dist < curr_radius) && dist < best_dist && ent_array[i] can_attract(self) )
{
best_poi = ent_array[i];
}

Code Snippet
Plaintext
	if( isDefined( best_poi ) )
{
// Override, currently only used for monkeys in the air.
if( isDefined( best_poi.attract_to_origin ) && best_poi.attract_to_origin )
{
position = [];
position[0] = groundpos( best_poi.origin + (0, 0, 100) );
position[1] = self;
}
else
{
position = self add_poi_attractor( best_poi );
}
}

So it says it is only used for monkies, so I guess I dont need it for what I am doing.
broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 5 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
Signature
⠀⠀⠀⣴⣴⡤
⠀⣠⠀⢿⠇⡇⠀⠀⠀⠀⠀⠀⠀⢰⢷⡗
⠀⢶⢽⠿⣗⠀⠀⠀⠀⠀⠀⠀⠀⣼⡧⠂⠀⠀⣼⣷⡆
⠀⠀⣾⢶⠐⣱⠀⠀⠀⠀⠀⣤⣜⣻⣧⣲⣦⠤⣧⣿⠶
⠀⢀⣿⣿⣇⠀⠀⠀⠀⠀⠀⠛⠿⣿⣿⣷⣤⣄⡹⣿⣷
⠀⢸⣿⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿
⠀⠿⠃⠈⠿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠿⠿⠿

⠀⢀⢀⡀⠀⢀⣤⠀⠀⠀⠀⠀⠀⠀⡀⡀
⠀⣿⡟⡇⠀⠭⡋⠅⠀⠀⠀⠀⠀⢰⣟⢿
⠀⣹⡌⠀⠀⣨⣾⣷⣄⠀⠀⠀⠀⢈⠔⠌
⠰⣷⣿⡀⢐⢿⣿⣿⢻⠀⠀⠀⢠⣿⡿⡤⣴⠄⢀⣀⡀
⠘⣿⣿⠂⠈⢸⣿⣿⣸⠀⠀⠀⢘⣿⣿⣀⡠⣠⣺⣿⣷
⠀⣿⣿⡆⠀⢸⣿⣿⣾⡇⠀⣿⣿⣿⣿⣿⣗⣻⡻⠿⠁
⠀⣿⣿⡇⠀⢸⣿⣿⡇⠀⠀⠉⠉⠉⠉⠉⠉⠁
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
Koan's Contact & Social Linksh-r_Koan_my website
So it says it is only used for monkies, so I guess I dont need it for what I am doing.

I think you still need it for a trap that attracts zombies, if the player throws it. It says it's used for monkeys in the air. If it's not a throwable trap you might still need this part:

Code Snippet
Plaintext
		else
{
position = self add_poi_attractor( best_poi );
}


Since this code is found in _zombiemode_utility.gsc, used for all zombiemode scripts, I wouldn't edit that function. You might be able to call the create_zombie_point_of_interest() function (and related ones) on any throwable trap/item you're looking to use.

I'm not an expert though, maybe someone with more knowledge can correct me.
Last Edit: October 21, 2015, 08:12:19 am by Koan

 
Loading ...