So, I was wondering if it is possible
According to the API, SpawnWeaponItem("WpnGrenadesThrown",...); will spawn a live grenade
Thank you in advance
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
spawning grenade dud
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- gwendalaze
- Superfighter
- Posts: 84
- Joined: Sat Mar 19, 2016 12:55 pm
- Title: Jarate Yellow Belt
- Started SFD: PreAlpha 1.1.4
- Location: France
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
if, for a live grenade, you mean a thrown grenade, the used script is not the one for creating weapons but the one used for creating object, like this:
Game.CreateObject("WPNGRENADESTHROWN" , new Vector2 (x,y));
So with this sintax you spawn a thrown grenade at the coordinates of x and y variables that you could change into numbers, variables, etc.
Obviously you need the method for use this command so the complete script is:
public void Grenade(TriggerArgs arg)
{
Game.CreateObject("WPNGRENADESTHROWN" , new Vector2 (0,0));
}
Create a button in your map then place the name of the method "Grenade" in the Script method section and test the map, if you press the button the grenades will spawn at the center of the map (because for the zeroes that I put in the coordinates of the Vector2).
Game.CreateObject("WPNGRENADESTHROWN" , new Vector2 (x,y));
So with this sintax you spawn a thrown grenade at the coordinates of x and y variables that you could change into numbers, variables, etc.
Obviously you need the method for use this command so the complete script is:
public void Grenade(TriggerArgs arg)
{
Game.CreateObject("WPNGRENADESTHROWN" , new Vector2 (0,0));
}
Create a button in your map then place the name of the method "Grenade" in the Script method section and test the map, if you press the button the grenades will spawn at the center of the map (because for the zeroes that I put in the coordinates of the Vector2).
0 x
- gwendalaze
- Superfighter
- Posts: 84
- Joined: Sat Mar 19, 2016 12:55 pm
- Title: Jarate Yellow Belt
- Started SFD: PreAlpha 1.1.4
- Location: France
thanks jaksparro, but I alreay know how to codeJakSparro98 wrote:if, for a live grenade, you mean a thrown grenade, the used script is not the one for creating weapons but the one used for creating object, like this:
Game.CreateObject("WPNGRENADESTHROWN" , new Vector2 (x,y));
So with this sintax you spawn a thrown grenade at the coordinates of x and y variables that you could change into numbers, variables, etc.
Obviously you need the method for use this command so the complete script is:
public void Grenade(TriggerArgs arg)
{
Game.CreateObject("WPNGRENADESTHROWN" , new Vector2 (0,0));
}
Create a button in your map then place the name of the method "Grenade" in the Script method section and test the map, if you press the button the grenades will spawn at the center of the map (because for the zeroes that I put in the coordinates of the Vector2).
My question was concerning disabled grenades, and, at this point, I guess there is no way
1 x
- Gwendalaze, failing at being fun, just like this signature
- JakSparro98
- Superfighter
- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 25
Oh, sorry if I treated you like a newbie.
You said you want a grenade that not explode instead of this, right? As you said I don't think now we can control the internal timer of the grenades or disable it.
We need to tell this to gurt only to know if in a future we could edit weapons and objects more deeply.
You said you want a grenade that not explode instead of this, right? As you said I don't think now we can control the internal timer of the grenades or disable it.
We need to tell this to gurt only to know if in a future we could edit weapons and objects more deeply.
1 x