Jump to content

Script to detect the Player's Force Power Level


Recommended Posts

I'm writing a script that detects what level the Player's Force Level is at, and does something different for all 4 possibilities. I've gotten everything to work, cutscenes, cameras, NPCs, and whatnot... except the actual line that detects what the Player's Force Level is. Theoretically this should work, right? This line was courtesy of "mjt" but it doesn't work.
 

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{

    if ( $get( FLOAT, "SET_FORCE_HEAL_LEVEL")$, $=$, $1$ )
    {
        kill ( "player" );
    }

}

 

I've gotten a similar script to work, this one detects what playermodel the Player is using, then again what Weapon they have equipped. I figured I could change this and it would work, but it didn't. 

 

if ( $get( STRING, "SET_PLAYERMODEL")$, $=$, $"player3"$ )
{
	if ( $get( STRING, "SET_WEAPON")$, $=$, $"WP_BLASTER_PISTOL"$ )
    {
		kill ( "player" );
	}
}


I've tried using "FLOAT" and "STRING" but neither worked. If somebody could help me get this one line working, it would really help! I have all 4 cutscenes and outcomes scripted, and ready to go, I just need this one line to work 😭

There's actually an unused line of dialogue in the base game for Kyle on Vjun1, it's 17kyk008.mp3. He tells the player to use Force Protect to avoid the rain. This line was never used though. I can't think of any other level, or mod I've played that would use such a script. When I remembered this, I thought if Ravensoft planned on using a similar script, but abandonded the idea, was it for time, or because they couldn't get it to work? 🤔 

 

Link to comment
  • 1 month later...
  • 1 month later...
On 2/5/2023 at 4:07 AM, Linken said:

I know this is a fairly old topic, but I wanted to put this one to rest.

I just went inside the code and the game is in fact not programmed to read the force power level in the if statements at this time.

Even though I didn't know such details, I always felt it would have been nice, if the game could check some global "ifs", so that when Jaden turns to the Dark Side, they have a new skin. Like being corrupted by the Dark Side for example.

Link to comment
7 hours ago, NumberWan said:

Even though I didn't know such details, I always felt it would have been nice, if the game could check some global "ifs", so that when Jaden turns to the Dark Side, they have a new skin. Like being corrupted by the Dark Side for example.

The close-up of Jaden's eye while being confronted by Kyle made me think that maybe they considered giving Jaden yellow eyes in that particular instance, would've been cool to see. 

Actually some unused code I found did indicate that they planned on having Jaden's saber turn red during those final levels (but obviously that didn't happen).

NumberWan and Lancelot like this
Link to comment
9 hours ago, Linken said:

The close-up of Jaden's eye while being confronted by Kyle made me think that maybe they considered giving Jaden yellow eyes in that particular instance, would've been cool to see. 

Actually some unused code I found did indicate that they planned on having Jaden's saber turn red during those final levels (but obviously that didn't happen).

Making the saber red is theoretically possible via a script – at least the commands do exist and the script can change that. At least I decompiled the original JA script and added some things into it, but not the color command. So it's possible perhaps.

Link to comment
  • 11 months later...

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...