Altering Frob with Scripting

From The DarkMod Wiki
Jump to navigationJump to search

Originally written by Ishtvan on

Mappers may want to set and unset frobability on items. For example, items within a glass display case could be set to not frobable until the glass breaks, if the FM author wants to place them closer than the "frob width" without them frobbing. To do this, these scriptfunctions may be used:

// set and get whether the entity is frobable
scriptEvent void setFrobable( float frobable );
scriptEvent float isFrobable( );


// set an entity to be frobable
$<ent name>.setFrobable( 1 );
// set an entity to be unfrobable
$<ent name>.setFrobable( 0 ) to set it unfrobable.