Hello
I was wondering if such a thing was possible, a player gun sequence that just teleports you where you shoot/aim at.
Do I have to create a new action? Is this possible with decorate? I don't know where to start at this is probably too advanced for my level
Teleport Gun
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Re: Teleport Gun
It is most definately possible, although might be somewhat hacky if you want to do this with decorate. I don't have the time to create actual working code for that, but it should follow something along this lines:
First, you perform a hitscan attack (or perhaps railgun with +ripper flag, to pass through enemies. If you don't want to, it is actually slightly easier). The attack must create a new puff, and the puff needs to have a few flags set - +PUFFGETSOWNER. +ALWAYSPUFF (and +HITTRACER and +PUFFONACTORS if you want it to collide with enemies). The puff is where magic will happen, using the Target field in the puff you should be able to access the player that shot. The puff should be at the place where you hit the wall/monster. Now you'd have to move the puff slightly back and call the A_WARP with Target as the parameter and with the WARPF_MOVEPTR flag.
Like i said, this is more of a rough guideline how to achieve this effect, and it is somehat hacky.
Using Zscript it would be far easier, and it would mostly follow the same pattern. A fake line attack, move the target point slightly back and then move the player to the point.
First, you perform a hitscan attack (or perhaps railgun with +ripper flag, to pass through enemies. If you don't want to, it is actually slightly easier). The attack must create a new puff, and the puff needs to have a few flags set - +PUFFGETSOWNER. +ALWAYSPUFF (and +HITTRACER and +PUFFONACTORS if you want it to collide with enemies). The puff is where magic will happen, using the Target field in the puff you should be able to access the player that shot. The puff should be at the place where you hit the wall/monster. Now you'd have to move the puff slightly back and call the A_WARP with Target as the parameter and with the WARPF_MOVEPTR flag.
Like i said, this is more of a rough guideline how to achieve this effect, and it is somehat hacky.
Using Zscript it would be far easier, and it would mostly follow the same pattern. A fake line attack, move the target point slightly back and then move the player to the point.
Re: Teleport Gun
Thanks man (or mam) I'll check this out, experiment and report back
i'm only starting out with decorate and like many users I don't feel good enough for zscript yet
i'm only starting out with decorate and like many users I don't feel good enough for zscript yet