This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Need script to destroy human-rockets.
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Kawabanga
- Superfighter

- Posts: 69
- Joined: Sat Mar 19, 2016 10:36 pm
- Title: Epic fails amateur.
- SFD Alias: My name is Kawa-bbanggza!!
- Started SFD: Late 2015
- Location: Poland
- Gender:
Need script to destroy human-rockets.
Need script to instantly destroy/explode human-rockets (players ridding a rocket, but not rockets alone, nor players alone). It would be triggered with an area trigger. Thanks for help.
0 x
- JakSparro98
- Superfighter

- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 27
probably bug
I don't think it could be possible right now, because the player riding the bazooka is another dedicated entity (the one used when the player is dead) and it isn't either object neither a player, so is not recognized by the trigger.

We must wait Gurt for updating the classes, he will update when they will be a lot, in order to avoiding to make a game version for each class or method suggestion he get.
I don't think it could be possible right now, because the player riding the bazooka is another dedicated entity (the one used when the player is dead) and it isn't either object neither a player, so is not recognized by the trigger.

We must wait Gurt for updating the classes, he will update when they will be a lot, in order to avoiding to make a game version for each class or method suggestion he get.
Last edited by JakSparro98 on Sun Mar 10, 2019 12:19 pm, edited 1 time in total.
Reason: fixed broken image link
Reason: fixed broken image link
0 x
- Gurt
- Lead Programmer

- Posts: 1887
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 36
Game.GetPlayers() will return all current players (dead or alive).
Use the IPlayer.IsDead to see if the player is dead. You can not see if a player is rocket-riding today through the ScriptAPI or destroy the rocket what I can see.
Use the IPlayer.IsDead to see if the player is dead. You can not see if a player is rocket-riding today through the ScriptAPI or destroy the rocket what I can see.
0 x
Gurt
- Duck
- Superfighter

- Posts: 77
- Joined: Tue Mar 22, 2016 2:35 am
- Title: gogogadgetkeyboard
- SFD Account: Shui
- Started SFD: Jul 2013
- Location: ->
- Gender:
- Contact:
What you could do is have the script search for bazooka projectiles, see one flying through the air and get its speed/vector, then find dead bodies with that same speed/vector and when you want the bazooka rider to explode it would place an invis block at that location.
For an area trigger you could have the script check if anything entering the area was a dead body with the velocity of a bazooka missile, (and the script would already be checking if bazooka missiles had been fired) then the enter method would place the invis block at the location of the entity who entered; once the dead body was gone the block would be removed (all in half a second).
Complicated, but it would work.
For an area trigger you could have the script check if anything entering the area was a dead body with the velocity of a bazooka missile, (and the script would already be checking if bazooka missiles had been fired) then the enter method would place the invis block at the location of the entity who entered; once the dead body was gone the block would be removed (all in half a second).
Complicated, but it would work.
0 x
'<'
- JakSparro98
- Superfighter

- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 27
The problem is that there is no way to search for projectiles entities, they aren't hookable with a pointer because you don't have a IObjectProjectile, for example, and as I said (and Gurt confirmed that) the trigger not see the projectiles so I cannot get the projectile as a Sender(the object that activated the trigger).Duck wrote:What you could do is have the script search for bazooka projectiles, see one flying through the air and get its speed/vector, then find dead bodies with that same speed/vector and when you want the bazooka rider to explode it would place an invis block at that location.
For an area trigger you could have the script check if anything entering the area was a dead body with the velocity of a bazooka missile, (and the script would already be checking if bazooka missiles had been fired) then the enter method would place the invis block at the location of the entity who entered; once the dead body was gone the block would be removed (all in half a second).
Complicated, but it would work.
Read this for a better understanding:
viewtopic.php?f=18&t=829
0 x