-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed/Fixed enemy jeep behaviour #1395
Conversation
- But still avoid him getting killed with vehicle colliding him !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in-game:
ENEMY_JEEP:
- OCB 0: Working
- OCB 1: Working
AI_X1
- OCB working. Path is being followed nicely. However: if there are plans for multiple enemy jeeps: then this may need to be revised? I Have not tested what happens if you change the OCB in run-time (for example if the player does something in game that will change the jeep's path).
AI_X2
- OCB 1: Working. Fires grenades as expected
- OCB 2: Working. Clarity necessary as to what values to be changed for different fall distances though.
- OCB 3: Working. Clarity necessary as to what values to be changed for different jump distances though.
- OCB 4: Working
- OCB 5: Working
- OCB 6: Working
- OCB 7: Unsure what this does so not tested
- OCB 8: Same as OCB 7.
General comments.
- Could Lara be killed if enemy jeep runs her over? Currently only pushes her out the way.
- Allow for multiple enemy jeeps?
Spider, // Only 2 block vault allowed. | ||
Ape, // Only 2 block vault allowed. | ||
SnowmobileGun, // Only 1 block vault allowed and 4 block drop max. | ||
EnemyJeep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why new LOT type is needed for enemy jeep? Was it a thing in original TR4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because i need more click that the other offer me.
TombEngine/Game/control/box.cpp
Outdated
@@ -1432,69 +1437,119 @@ void FindAITarget(CreatureInfo* creature, short objectNumber) | |||
} | |||
} | |||
|
|||
void FindAITargetObject(CreatureInfo* creature, int objectNumber) | |||
void FindAITargetObject(ItemInfo& item, GAME_OBJECT_ID objectID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why function argument was changed from CreatureInfo
to ItemInfo
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sezz did it :x
TombEngine/Game/effects/effects.cpp
Outdated
@@ -1255,7 +1255,7 @@ void TriggerDynamicLight(const Vector3& pos, const Color& color, float falloff) | |||
color.x * UCHAR_MAX, color.y * UCHAR_MAX, color.z * UCHAR_MAX); | |||
} | |||
|
|||
// Deprecated. Use above version instead. | |||
// DEPRECATED! DO NOT USE!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is deprecated and do not use, why not just delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sezz did that, don't know why this function is used everywhere :x
todo
Links to issue(s) this pull request concerns (if applicable)
"n/a"
Description of pull request
Check changelogs.md -> Enemy jeep.
Also corrected the changelogs a bit.
File required/for testing:
KV5_jeeptest.zip
Enemy Jeep (1.5)
The enemy jeep from TR4 has been re-implemented into TombEngine but the setup has changed. It requires the use of AI_X1 for path (need to start at 0 and end at whatever your path need to end) and AI_X2 objects to change it's behaviour through this path, AI_X2 ocb:
OCB 1: Drop grenade.
OCB 2: Vault.
OCB 3: Jump over pit.
OCB 4: Wait until player is near.
OCB 5: Disappear.
OCB 6: Activate heavy trigger.
OCB 7: Another vault (Need animation + state setup).
OCB 8: Another jump pit (Need animation + state setup).
Furthermore: you set the OCB on the ENEMY_JEEP object itself for the desired effect:
OCB 0: Will wait until the player is on a vehicle.
OCB 1: Will start regardless of whether the player is on a vehicle or not.
Warning:
Enemy jeep have changed drasticaly, the original object is not valid anymore !