Page 2 of 2

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

Posted: Tue Oct 01, 2013 3:32 pm
by Pyper
Guess it's just me. :(

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

Posted: Tue Oct 01, 2013 10:44 pm
by last
Have you tried to update this mod by downloading it again and overwrite all the files it uses?

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

Posted: Tue Dec 03, 2013 11:34 am
by Anton
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.

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

Posted: Tue Feb 25, 2014 8:58 pm
by RagdollZombie
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

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

Posted: Wed Feb 26, 2014 9:07 am
by Thomason1005
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