Jump to content

Scripting Help (For Entity Mod)


Recommended Posts

Hello, I'm trying to create a script that will make entities solid as soon as a duel ends. The reason is, in the japlus mod there's a short interval upon duel ending where the entity (player) isn't solid and can be glitched into other players or into the map. So far I've tried the following:


My icarus script:

set ( "SET_SOLID", "true" );


My entity mod:

{
"classname" "target_scriptrunner"
"count" "-1"
"victoryscript" "setSolid"
}



Any advice on how I may be able to achieve this would be greatly appreciated!

Link to comment

1: on INFO_PLAYER_START / INFO_PLAYER_DEATHMATCH make an USESCRIPT called mapname/intro.

2: inside that intro file on icarus you do:

affect player INSERT

SET_VICTORYSCRIPT mapname/victoryplayer

save and build.

3: now create the victoryplayer file on icarus.

put SET_SOLID, true on it.

save and build.

Got it! 🙂

 

PS: on SP sure it will works, not sure about MP. MP modding is not my field.

 

 

 

Link to comment

I’ve made a little progress. Current issue is it seems it isn’t applying it quick enough to stop the glitch. 
 

target_scriptrunner running ffa3/init on activator (null)
INFO: 63700 Script scripts/ffa3/init executed by player (null)
DEBUG: (null)(3): set( "SET_VICTORYSCRIPT", "ffa3/reward" ); [63725]
Kill: 0 2 2: Padawan killed Padawan (2) by MOD_MELEE
INFO: 65700 Script scripts/ffa3/reward executed by player (null)
DEBUG: (null)(0): wait( 50 ); [65725]
DEBUG: (null)(0): use( "UseReward" ); [65800]
target_scriptrunner running ffa3/setSolid on activator (null)
INFO: 65800 Script scripts/ffa3/setSolid executed by player (null)
DEBUG: (null)(0): set( "SET_SOLID", "TRUE" ); [65800]

 

It appears that "SET_SOLID" won't apply instantly. Is there a way to get stuff like this to apply changes as soon as it gets read?

Link to comment

Yea a 50 millisecond delay, that shouldn’t be noticeable at all though. I tested with setting SET_SOLID to false and it worked perfectly (as far as duel ending and event firing instantly). Idk why it seems there’s a delay when I set it to true.

 

Even without the delay it doesn't instantly apply it.
 

INFO: 81500 Script scripts/ffa3/init executed by player (null)
DEBUG: (null)(0): set( "SET_VICTORYSCRIPT", "ffa3/reward" ); [81525]
Kill: 1 2 2: Padawan killed Padawan (2) by MOD_MELEE
INFO: 84000 Script scripts/ffa3/reward executed by player (null)
DEBUG: (null)(1): use( "UseReward" ); [84025]
target_scriptrunner running ffa3/setSolid on activator (null)
INFO: 84025 Script scripts/ffa3/setSolid executed by player (null)
DEBUG: (null)(1): set( "SET_SOLID", "true" ); [84025]

 

Edit: It would appear it works whenever a player respawns, perhaps because I have it targeted on player spawn. Is there a way to target players while they are actively playing?

Link to comment

These are my scripts.

/////ffa3/init/////
set ( /*@SET_TYPES*/ "SET_VICTORYSCRIPT", "ffa3/reward" );

/////ffa3/reward/////
use ( "UseReward" );

/////ffa3/setSolid/////
task ( "applySolid" )
{

	affect ( "UseReward", /*@AFFECT_TYPE*/ INSERT )
	{
		set ( "SET_SOLID", "true" );
	}

}

do ( "applySolid" );

 

This is my entity mod for FFA3. Of course I have 16 some odd spawns so.

{
"angle" "270"
"origin" "728 1424 -56"
"classname" "info_player_deathmatch"
"target" "player_spawn_1"
}
{
"classname" "target_delay"
"wait" "0.0"
"targetname" "player_spawn_1"
"target" "PlayerSpawn"
}
{
"classname" "target_scriptrunner"
"count" "-1"
"targetname" "PlayerSpawn"
"usescript" "ffa3/init"
"spawnflags" "1"
}
{
"classname" "target_scriptrunner"
"count" "-1"
"targetname" "UseReward"
"usescript" "ffa3/setSolid"
"spawnflags" "1"
}
Smoo likes this
Link to comment

Why the target_delay? Why the task? Why the UseReward target_scriptrunner?

I'd try it like this:

{
"angle" "270"
"origin" "728 1424 -56"
"classname" "info_player_deathmatch"
"target" "PlayerSpawn"
}
{
"classname" "target_scriptrunner"
"count" "-1"
"targetname" "PlayerSpawn"
"usescript" "ffa3/init"
"spawnflags" "1"
}

with scripts

/////ffa3/init/////
set ( /*@SET_TYPES*/ "SET_VICTORYSCRIPT", "ffa3/reward" );

/////ffa3/reward/////
set ( "SET_SOLID", "true" );

 

Smoo likes this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...