Raised This Month: $32 Target: $400
 8% 

Solved [TF2] Changing 'unlock_point' in 'tf_logic_koth'?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lazyneer
Junior Member
Join Date: Sep 2016
Old 04-24-2018 , 14:52   [TF2] Changing 'unlock_point' in 'tf_logic_koth'?
Reply With Quote #1

Is it possible to change the keyvalue ''unlock_point' of the entity 'tf_logic_koth'?
I have tried DispatchKeyValue, SetEntProp and SetEntData but none of them were successful.

Last edited by Lazyneer; 04-25-2018 at 16:09.
Lazyneer is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-24-2018 , 15:38   Re: [TF2] Changing 'unlock_point' in 'tf_logic_koth'?
Reply With Quote #2

My first thought would be to use Stripper: Source to do it as it operates during map load.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Lazyneer
Junior Member
Join Date: Sep 2016
Old 04-25-2018 , 04:16   Re: [TF2] Changing 'unlock_point' in 'tf_logic_koth'?
Reply With Quote #3

I would prefer a solution that doesn't require me to install something other than a SourceMod plugin.
Lazyneer is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 04-25-2018 , 06:08   Re: [TF2] Changing 'unlock_point' in 'tf_logic_koth'?
Reply With Quote #4

Use DispatchKeyValue in a spawn hook:

Code:
public void OnEntityCreated(int entity, const char[] className) {
	if (StrEqual(className, "tf_logic_koth")) {
		SDKHook(entity, SDKHook_Spawn, OnKOTHLogicSpawned);
	}
}

public Action OnKOTHLogicSpawned(int entity) {
	DispatchKeyValue(entity, "unlock_point", "10");
	return Plugin_Continue;
}
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Lazyneer
Junior Member
Join Date: Sep 2016
Old 04-25-2018 , 16:09   Re: [TF2] Changing 'unlock_point' in 'tf_logic_koth'?
Reply With Quote #5

That works, thank you.
Lazyneer is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode