Lazarus Posted December 8, 2017 Posted December 8, 2017 I am trying to access in my script a certain instance, so in my spawnscript i declared a float with the name "RodianChat" ... then i did a set on that float by setting RodianChat to 1. Now when my player hits a trigger, I want to check the status of RodianChat. So i did an If statement in there to check it, but it wont fire. Scripts are as following //Generated by BehavEd rem ( "----------" ); rem ( "Declare map Variables" ); rem ( "----------" ); declare ( /@DECLARE_TYPE/ FLOAT, "RodianChat" ); set ( "RodianChat", "1" ); rem ( "----------" ); rem ( "Setting up player skills" ); rem ( "----------" ); affect ( "player", /@AFFECT_TYPE/ FLUSH ) { set ( /@SET_TYPES/ "SET_SABER_THROW", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_SABER_DEFENSE", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_SABER_OFFENSE", /@[member='SaberBlade83']_STYLES/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_HEAL_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_JUMP_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_SPEED_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_PUSH_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_PULL_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_MINDTRICK_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_GRIP_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_LIGHTNING_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_RAGE_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_PROTECT_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_ABSORB_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_DRAIN_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_FORCE_SIGHT_LEVEL", /@[member='Force']_LEVELS/ "0" ); set ( /@SET_TYPES/ "SET_PLAYERMODEL", "prisoner" ); set ( /@SET_TYPES/ "SET_WEAPON", /@WEAPON_NAMES/ "WP_BLASTER_PISTOL" ); set ( /@SET_TYPES/ "SET_WEAPON", "WP_MELEE" ); set ( /@SET_TYPES/ "SET_ITEM", /@ITEM_NAMES/ "INV_ELECTROBINOCULARS" ); set ( /@SET_TYPES/ "SET_PLAYER_TEAM", /@TEAM_NAMES/ "TEAM_PLAYER" ); } And for the script on the trigger //Generated by BehavEd rem ( "----------" ); rem ( "Cutscene Start" ); rem ( "----------" ); if ( $RodianChat$, $=$, $1$ ) { affect ( "fake_player", /*@AFFECT_TYPE*/ FLUSH ) { } camera ( /*@CAMERA_COMMANDS*/ ENABLE ); camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cutscene_camRodian1", ORIGIN)$, < 0.000 0.000 0.000 >, 0 ); wait ( 5000.000 ); camera ( /*@CAMERA_COMMANDS*/ DISABLE ); set ( "RodianChat", "2" ); } Smoo likes this
Lazarus Posted December 9, 2017 Author Posted December 9, 2017 Fixed. As i looked just over my script, i realized that when I declared my variable as float... i should add that to if statement as well script as well... else it has no idea what to check for. What a cup of coffee cant accomplished //Generated by BehavEd rem ( "----------" ); rem ( "Cutscene Start" ); rem ( "----------" ); if ( $get( FLOAT, "RodianChat")$, $=$, $1$ ) { affect ( "fake_player", /*@AFFECT_TYPE*/ FLUSH ) { } camera ( /*@CAMERA_COMMANDS*/ ENABLE ); camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cutscene_camRodian1", ANGLES)$, < 0.000 0.000 0.000 >, 0 ); wait ( 5000.000 ); camera ( /*@CAMERA_COMMANDS*/ DISABLE ); set ( "RodianChat", "2" ); remove ( "fake_player" ); } Noodle, Smoo and Raz0r like this
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now