AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Is it possible to replace an entity with Stripper:Source with MULTIPLE entities? (https://forums.alliedmods.net/showthread.php?t=334279)

Weasel 09-12-2021 00:49

Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
 
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).
.

nosoop 09-12-2021 01:16

Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
 
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.

Austin 09-14-2021 14:18

Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
 
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"



Marttt 09-14-2021 14:29

Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
 
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

Tonblader 09-14-2021 16:25

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

Originally Posted by Marttt (Post 2757766)
But a plugin that does that would have more flexibility

Not a bad idea that some objects can drop weapons or items.

Weasel 09-21-2021 20:04

Re: Is it possible to replace an entity with Stripper:Source with MULTIPLE entities?
 
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.


All times are GMT -4. The time now is 08:46.

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