[Hotspot] Wipeout hotspot +2 other hotspots!

Pyper
Posts: 7
Joined: Sun Sep 08, 2013 9:53 am

Re: [Hotspot] Wipeout hotspot +2 other hotspots!

Post by Pyper » Tue Oct 01, 2013 3:32 pm

Guess it's just me. :(

User avatar
last
Posts: 2154
Joined: Fri Jan 07, 2011 4:02 am
Location: Estonia

Re: [Hotspot] Wipeout hotspot +2 other hotspots!

Post by last » Tue Oct 01, 2013 10:44 pm

Have you tried to update this mod by downloading it again and overwrite all the files it uses?

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 8:16 pm
Location: Los Angeles
Contact:

Re: [Hotspot] Wipeout hotspot +2 other hotspots!

Post by Anton » Tue Dec 03, 2013 11:34 am

last wrote:Updated/ fixed the hotspot script files.
All of those 3 hotspots should work flawlessly with a200 now
Edit: updated file in the original SteelRaven7 post also.
Download link
Whoa, sorry I missed this update. I've added the update to SUMLauncher.

User avatar
RagdollZombie
Posts: 852
Joined: Thu Oct 25, 2012 3:42 pm
Location: Click the website link for my Youtube channel
Contact:

Re: [Hotspot] Wipeout hotspot +2 other hotspots!

Post by RagdollZombie » Tue Feb 25, 2014 8:58 pm

I've been trying to edit the launcher hotspot to work with weapons/items instead of characters, but I've been unsuccessful.... does anyone know how i might change the script to work with weapons/items instead?

Code: Select all

	

    void Init() {
    }
     
    void SetParameters() {
            params.AddString("Velocity x", "0.0");
            params.AddString("Velocity y (up)", "0.0");
            params.AddString("Velocity z", "0.0");
            params.AddString("Trigger on entry", "1");
            params.AddString("Trigger on exit", "0");
    }
     
    void HandleEvent(string event, MovementObject @mo){
        if(event == "enter" && params.GetString("Trigger on entry") != "0") {
            Launch(mo);
        }
        else if(event == "exit" && params.GetString("Trigger on exit") != "0"){
            Launch(mo);
        }
    }
     
    void Launch(MovementObject @mo) {
     
            //If player is ragdollized, don't launch since this way of launching ragdolls may cause problems.
            if(mo.GetIntVar("state") == 4) return;
     
            mo.velocity.x = params.GetFloat("Velocity x");
            mo.velocity.y = params.GetFloat("Velocity y (up)");
            mo.velocity.z = params.GetFloat("Velocity z");
        mo.Execute("SetOnGround(false);");
        mo.Execute("pre_jump = false;");
}

I tried replacing MovementObject with ItemObject and deleted the character specific code, but when i test it in-game, I get an error that says

"'velocity' is not a member of 'ItemObject'"

This is my edited version of the script (that generates the error)

Code: Select all

void Init() {
}

void SetParameters() {
	params.AddString("Velocity x", "0.0");
	params.AddString("Velocity y (up)", "0.0");
	params.AddString("Velocity z", "0.0");
	params.AddString("Trigger on entry", "1");
	params.AddString("Trigger on exit", "0");
}

void HandleEvent(string event, ItemObject @mo){
    if(event == "enter" && params.GetString("Trigger on entry") != "0") {
        Launch(mo);
    }
    else if(event == "exit" && params.GetString("Trigger on exit") != "0"){
        Launch(mo);
    }
}

void Launch(ItemObject @mo) {


	mo.velocity.x = params.GetFloat("Velocity x");
	mo.velocity.y = params.GetFloat("Velocity y (up)");
	mo.velocity.z = params.GetFloat("Velocity z");
}
once again, sorry for my noobyness :P

User avatar
Thomason1005
Posts: 712
Joined: Sat Apr 20, 2013 7:44 am
Location: GerMany

Re: [Hotspot] Wipeout hotspot +2 other hotspots!

Post by Thomason1005 » Wed Feb 26, 2014 9:07 am

if you look into aschar.as where weapons are thrown (line 5317, ThrowWeapon()) theres

Code: Select all

            ItemObject@ io = ReadItemID(weapon_id);
            io.SetAngularVelocity(vec3);
            io.SetLinearVelocity(vec3);
so in your case that would be

Code: Select all

io.SetLinearVelocity(vec3(params.GetFloat("Velocity x"),params.GetFloat("Velocity y (up)"),params.GetFloat("Velocity z")))
i think the vector is in world space, otherwise you might have to transform it and you propably should do io.SetThrown(); too.


im not sure what you want to do as i dont think hotspots are triggered by items, only by characters

Edit:and use io instead of mo, its confusing

Post Reply