thanksi think i can help
ill give the script in conversation
ok this guy didn't answer for 15 days so I'll just do it myself.i think i can help
ill give the script in conversation
P_DoSuperTransformation
. I'm not sure if it's aimed at the player user data or the player mobj, but it basically sets the player's state into the transformation state, plays the sound and music, and just acts like a regular Super transformation. It also takes a second argument: true if you want to give 50 rings on call or false if not. It still has to check if you have all 7 emeralds. If not, it won't call.player.powers[pw_super]
.function goSuperSilent(player)
player.issuper = true // Player goes super
player.powers[pw_super] = 1 // Player is super for 1 tic
end
COM_AddCommand("gosupersilent", goSuperSilent())
I did in conversation with the guyok this guy didn't answer for 15 days so I'll just do it myself.
There's a Lua function namedP_DoSuperTransformation
. I'm not sure if it's aimed at the player user data or the player mobj, but it basically sets the player's state into the transformation state, plays the sound and music, and just acts like a regular Super transformation. It also takes a second argument: true if you want to give 50 rings on call or false if not. It still has to check if you have all 7 emeralds. If not, it won't call.
However, if you want a soundless and musicless transformation, the player user data has two variables to help: issuper and powers. For issuper, I think you have to set it to true (try setting it to 1 if true doesn't work). powers, however, is an table that has multiple variables that affect how the player acts in the map. It has pw_super, a variable used internally to count how many tics the player was in super. To point to pw_super, useplayer.powers[pw_super]
.
So to properly create a function to turn the player super but silently, use this code:
function goSuperSilent(player)
player.issuper = true // Player goes super
player.powers[pw_super] = 1 // Player is super for 1 tic
end
However, you have only created the function. To assign it to a command, use this code:
COM_AddCommand("gosupersilent", goSuperSilent())
All of the code combined creates a command called gosupersilent that uses the function goSuperSilent. If you want a version that uses the P_DoSuperTransformation function (with ring give), assign it to a command called gosuperloud or just gosuper: depends on your preferences.
If you have any errors, reach out. Though I swear I'm not THAT experienced in Lua, I just like reading the SRB2 Wiki.
calm down broI did in conversation with the guy
This is really useful thanksok this guy didn't answer for 15 days so I'll just do it myself.
There's a Lua function namedP_DoSuperTransformation
. I'm not sure if it's aimed at the player user data or the player mobj, but it basically sets the player's state into the transformation state, plays the sound and music, and just acts like a regular Super transformation. It also takes a second argument: true if you want to give 50 rings on call or false if not. It still has to check if you have all 7 emeralds. If not, it won't call.
However, if you want a soundless and musicless transformation, the player user data has two variables to help: issuper and powers. For issuper, I think you have to set it to true (try setting it to 1 if true doesn't work). powers, however, is an table that has multiple variables that affect how the player acts in the map. It has pw_super, a variable used internally to count how many tics the player was in super. To point to pw_super, useplayer.powers[pw_super]
.
So to properly create a function to turn the player super but silently, use this code:
function goSuperSilent(player)
player.issuper = true // Player goes super
player.powers[pw_super] = 1 // Player is super for 1 tic
end
However, you have only created the function. To assign it to a command, use this code:
COM_AddCommand("gosupersilent", goSuperSilent())
All of the code combined creates a command called gosupersilent that uses the function goSuperSilent. If you want a version that uses the P_DoSuperTransformation function (with ring give), assign it to a command called gosuperloud or just gosuper: depends on your preferences.
If you have any errors, reach out. Though I swear I'm not THAT experienced in Lua, I just like reading the SRB2 Wiki.