Raised This Month: $51 Target: $400
 12% 

FF2 [FIXED] Engineer Toolbox (tf_weapon_builder, index 28)?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 09-07-2014 , 21:42   [FIXED] Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #1

For a boss i'm working on, i'm having a bit of trouble being able to give tf_weapon_builder, item index 28 properly to be able to give the boss an ability to construct disposable buildings.

I've tried this without results:

Code:
	"weapon1"
	{
		"name"				"tf_weapon_builder"
		"index"				"28"
		"show"				"1"
	}
Later on, tried giving it from the subplugin:
Code:
Rage_Nitori(const String:ability_name[],index)
{
	new Boss=GetClientOfUserId(FF2_GetBossUserId(index));
	TF2_RemoveWeaponSlot(Boss, TFWeaponSlot_PDA);
	TF2_RemoveWeaponSlot(Boss, TFWeaponSlot_Grenade);
	TF2_RemoveWeaponSlot(Boss, TFWeaponSlot_Building);
	SetEntPropEnt(Boss, Prop_Send, "m_hActiveWeapon", SpawnWeapon(Boss, "tf_weapon_pda_engineer_build", 737, 100, 5, "61 ; 5 ; 63 ; 5 ; 65 ; 5 ; 66 ; 0.25 ; 128 ; 1 ; 206 ; 6 ; 295 ; 1"));
	SetEntPropEnt(Boss, Prop_Send, "m_hActiveWeapon", SpawnWeapon(Boss, "tf_weapon_pda_engineer_destroy", 26, 100, 5, "61 ; 5 ; 63 ; 5 ; 65 ; 5 ; 66 ; 0.25 ; 128 ; 1 ; 206 ; 6 ; 295 ; 1"));
	SetEntPropEnt(Boss, Prop_Send, "m_hActiveWeapon", SpawnWeapon(Boss, "tf_weapon_builder", 28, 100, 5, "295 ; 1"));
}
Now the boss is given the construction PDA and the destruction PDA normally, but the toolbox is what im having trouble giving the boss when it activates. As a result i can't build the disposable mini-sentry or disposable dispenser (the wrench's attributes are 81;0.50; 93;4.50; 95;0; 124;1; 286;10.00; 287;0.10; 295;1; 343;0.50; 344;2.50; 353;1; 2025;1) until i can ensure that tf_weapon_builder (index 28) is given properly upon rage activation.

As it is currently, it would happen upon a loss of life/rage activation, but the original plan is to have it activate automatically when the boss only has 25% of HP left (would that need a DOT?)
__________________

Last edited by 93SHADoW; 01-20-2015 at 13:52. Reason: FIXED.
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
Wliu
Veteran Member
Join Date: Apr 2013
Old 09-08-2014 , 15:38   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #2

Have you seen how Randomizer does it? That should help a bit.
__________________
~Wliu
Wliu is offline
AeroAcrobat
AlliedModders Donor
Join Date: Apr 2011
Location: lives in a circus
Old 09-08-2014 , 18:10   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #3

AFAIK the wheatley boss had the same problem, not sure if it got fixed.
__________________
AeroAcrobat is offline
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 09-08-2014 , 22:32   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #4

So while i was looking at the source code for TF2items_Randomizer, i did come across these two bits of code (note that im fairly new to coding/modifying ability plugins and plugins in general):

Code:
		if (mel > 0)
		{
			GiveWeaponOfIndex(client, iWeaponMelee[mel]);
			if (class != TFClass_Engineer && !IsMedieval() && !IsFakeClient(client))
			{
				switch (iWeaponMelee[mel])
				{
					case 7, 142, 155, 169, 329, 589, 2197:
					{
						if (class != TFClass_Spy)
						{
							GiveWeaponOfIndex(client, 25);
							GiveWeaponOfIndex(client, 26);
						}
						GiveWeaponOfIndex(client, 28);
					}
				}
			}
		}
Code:
//builder
	SetTrieString(hItemInfoTrie, "28_classname", "tf_weapon_builder", false);
	SetTrieValue(hItemInfoTrie, "28_index", 28, false);
	SetTrieValue(hItemInfoTrie, "28_slot", 5, false);
	SetTrieValue(hItemInfoTrie, "28_quality", 0, false);
	SetTrieValue(hItemInfoTrie, "28_level", 1, false);
	SetTrieString(hItemInfoTrie, "28_attribs", "", false);
	SetTrieValue(hItemInfoTrie, "28_ammo", -1, false);
I'll PM the source code of the subplugin if you need to take a look at it.
Attached Thumbnails
Click image for larger version

Name:	compile.png
Views:	182
Size:	22.2 KB
ID:	137718  
__________________

Last edited by 93SHADoW; 09-08-2014 at 23:29.
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
Maximilian_
Veteran Member
Join Date: Oct 2014
Old 10-12-2014 , 15:43   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #5

i did fix

https://forums.alliedmods.net/showth...light=wheatley

Last edited by Maximilian_; 10-12-2014 at 15:43.
Maximilian_ is offline
Maximilian_
Veteran Member
Join Date: Oct 2014
Old 10-12-2014 , 15:44   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #6

i useing giveweapon and he is work
Maximilian_ is offline
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 10-12-2014 , 15:51   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #7

Giveweapon is a good temporary solution for now, but what I want to do is so that the builder can be passively given without the need to depend on another plugin.
__________________
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
Maximilian_
Veteran Member
Join Date: Oct 2014
Old 10-12-2014 , 16:03   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #8

we can consider three* source of problem
1 freak fortress 2
2 tf2 items
3 valve :p

Last edited by Maximilian_; 10-12-2014 at 16:04.
Maximilian_ is offline
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 10-12-2014 , 16:20   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #9

Well i finally got the builder working...the answer lies within tf2item's natives...



Now can be considered SOLVED
__________________

Last edited by 93SHADoW; 10-12-2014 at 16:27.
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
Spyper
Senior Member
Join Date: Sep 2013
Old 10-12-2014 , 16:31   Re: Engineer Toolbox (tf_weapon_builder, index 28)?
Reply With Quote #10

Quote:
Originally Posted by SHADoW NiNE TR3S View Post
Well i finally got the builder working...the answer lies within tf2item's natives...



Now can be considered SOLVED
So tf_weapon_builder is working
Spyper 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 22:23.


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