A_JumpIfFarther (int distance, int offset)
Something that seems like it could be easily implimented, and could be rather useful, ie and monster is firing off grenade rounds with SpidRefire or something like that, and when the target gets too far away, it will keep firing grenade rounds untill he either hits his pain state, loses its los, or dies.
[not needed] A_JumpIfFarther
Moderator: Graf Zahl
-
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
-
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
Well, say I had the Monster shooting grenade salvos at the player with a refire, and the player gets out of range of the grenade salvos, the monster wont stop shooting the grenade salovs unless he dies, loses the LOS, or hits his pain state. Wereas I could use A_JumpIfFarther to just simply call off the grenade salvos, and bring the monster back up to the see state, were I would use JumpIfClosers to decide which attack it would use next.
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
-
- Posts: 183
- Joined: Thu Dec 29, 2005 8:09
Code: Select all
FRAM A 0 A_JumpIfCloser(256, 1)
goto see
//continue with attack
No need for jumpiffarther when you can just use the jumpifcloser logic in reverse, as Graf already pointed out.
-
- Persecution Complex
- Posts: 363
- Joined: Fri Aug 05, 2005 8:51
-
- Posts: 183
- Joined: Thu Dec 29, 2005 8:09
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany