Altering Frob with Scripting: Difference between revisions
From The DarkMod Wiki
Jump to navigationJump to search
No edit summary |
mNo edit summary |
||
Line 8: | Line 8: | ||
Example: | Example: | ||
// set an entity to be frobable | // set an entity to be frobable: | ||
$<ent name>.setFrobable( 1 ); | $<ent name>.setFrobable( 1 ); | ||
// set an entity to be unfrobable | // set an entity to be unfrobable: | ||
$<ent name>.setFrobable( 0 ) | $<ent name>.setFrobable( 0 ); | ||
[[Category:Scripting]] | [[Category:Scripting]] |
Latest revision as of 21:10, 15 March 2022
Originally written by Ishtvan on http://forums.thedarkmod.com/topic/4205
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( );
Example:
// set an entity to be frobable: $<ent name>.setFrobable( 1 ); // set an entity to be unfrobable: $<ent name>.setFrobable( 0 );