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

Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Weasel
AlliedModders Donor
Join Date: Apr 2004
Location: Undisclosed / Secure
Old 09-12-2021 , 00:49   Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
Reply With Quote #1

I was looking at the documentation for Stripper:Source (https://www.bailopan.net/stripper/), and was wondering if anyone knows a way to not just replace and entity with another, but replace it with multiple entities?

Seems like that's probably not the case, but wanted to ask just in case anybody has come across a way to do that.

Basically, what I am trying to accomplish is a modification for Fistful-of-Frags, where "crates" will be replaced directly with "weapons" (plural) for players to just pick-up.

PS: Would also be nice to make replacement items spawned have coordinates that are relative to original entity's coordinates (e.g. 8 units or 16 units slightly in X, Y, Z so they are not all overlapping at spawn).
.
__________________
Pwease pardon by bad Engrish.
Steam Profile, Steam Group, Stats, Twitter

Last edited by Weasel; 09-12-2021 at 00:51. Reason: spleing, gammer, etc.
Weasel is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 09-12-2021 , 01:16   Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
Reply With Quote #2

I believe that's not possible with Stripper:Source. If you really want to manipulate entities at level initialization time, you can use a plugin written for either Level KeyValues (up to SM 1.10, functionality removed in 1.11+) or Entity Lump Manager (which you'd need to compile since it relies on the game-specific SDK) to find your crates, then add new entries in response.

You may also be able to modify the entities at runtime instead, using FindEntityByClassname at round start or adding a listener to OnEntityCreated then removing / adding entities as you'd like. I'm not familiar with FoF to know how the crates are implemented, however.
__________________
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)

Last edited by nosoop; 09-12-2021 at 02:14.
nosoop is offline
Austin
Senior Member
Join Date: Oct 2005
Old 09-14-2021 , 14:18   Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
Reply With Quote #3

I don't know of a way to write a global rule that would change all crates into three weapons but you can:
1) have one rule that would change all crates into one specific weapon
2) manually go in and create one entry for every crate and change it into however many items you want.

And your other question, you can adjust the angles and locations of the placed itmes but agian only if you are manually tweaking every itme placed.

Here is an example that changes the plastic chair in dust into three weapons but again this is a one by one manual change for every item you want to change.

You should ask this question in the stripper forum.
The feature Stripper doensn't have is automaticially changing one item into multiple items.
There may be a way but I don’t think so.

PHP Code:
;remove the plastic chair and replace it with 3 weapons

this is the hammer id of the chair
remove
:
{
"hammerid" "3893964"
}

add three weaons in about the same location
add
:
{
"origin" "1393 3753 48"
"angles" "0.0 115.0 0.0"
"classname" "weapon_m4a1"
}
{
"origin" "1400 3753 48"
"angles" "0.0 115.0 0.0"
"classname" "weapon_m4a1_silencer"
}
{
"origin" "1410 3753 48"
"angles" "0.0 115.0 0.0"
"classname" "weapon_ak47"


Last edited by Austin; 09-14-2021 at 14:19.
Austin is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-14-2021 , 14:29   Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
Reply With Quote #4

you can use "logic case" in stripper to spawn different items
supposing that is a crate that breaks, then you would trigger the OnBreak event to spawn these things
But a plugin that does that would have more flexibility
__________________
Marttt is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 09-14-2021 , 16:25   Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
But a plugin that does that would have more flexibility
Not a bad idea that some objects can drop weapons or items.
Tonblader is offline
Weasel
AlliedModders Donor
Join Date: Apr 2004
Location: Undisclosed / Secure
Old 09-21-2021 , 20:04   Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
Reply With Quote #6

Interesting, I never thought to use hammerid's, of course those could change later on official maps and stuff. But would give a way to target a specific object's.

Thanks.
__________________
Pwease pardon by bad Engrish.
Steam Profile, Steam Group, Stats, Twitter
Weasel is offline
Reply


Thread Tools
Display Modes

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 08:37.


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