Commit graph

94 commits

Author SHA1 Message Date
hispidence
267b05c91f Allow Vec3s to be saved and loaded in LevelVars and GameVars 2022-08-20 14:23:07 +01:00
Sezz
3f18fd0fec Merge branch 'entity_fix' into IndependentGuide_Adngel 2022-08-12 21:01:27 +10:00
hispidence
9686f80b29 Add documentation for EventSequence and update autogenerated docs. 2022-08-11 22:49:31 +01:00
Adngel
a12a54d85a Update MoveableObject.cpp 2022-08-06 16:35:33 +02:00
Adngel
0864ef30a1 Update MoveableObject.cpp
The functions names changed again, so I'm reverting the comments change I did.
2022-08-06 16:23:46 +02:00
Adngel
ed7a085089 Merge branch 'ten_beta' into IndependentGuide_Adngel 2022-08-06 16:04:45 +02:00
hispidence
eebbcea7a5 Change new->New for consistency.
Change byte to unsigned char in accordance with coding standards.
2022-08-04 21:42:29 +01:00
Adngel
bf31a3d68b Revision
- The Do-Actions and the Make_Targetable functions, have been removed from this code, and implemented as a Lua Module to be shared externally.

- With the new Trigger approach, this commitment removes the implementation of the parameters feature.

- Created a new function: GetSlotHP(), So Lua can read the default life points designated for the enemies. (useful for life percentages and such).

- Changed the functions:
 GetItemFlag and SetItemFlag to
 GetItemFlags and SetItemFlags
So they fits with the variable name they are referencing.
2022-08-03 00:12:12 +02:00
hispidence
be4b98dc41 Merge branch 'ten_beta' into lua_funcs 2022-08-01 19:33:19 +01:00
Adngel
f3d9acf19c Scary text flag
Now, when the flag is active, the Guide will get scared when he reads the next inscription.

Like in TR4, but without need to be in room 70.

The flag onces the action is done, it deactivates itself.

Unlike TR4, I set that the scared face changed back to his normal one at the end of the reading animation, so builders can keep using it with his normal face.
2022-07-25 12:59:05 +02:00
Adngel
155867d6e0 Guide, cleaning, polishment, fixes and implementation of new feature.
Some cleaning, polishment and bug fixes (It wasn't refresh the AI searched when moving to a passed node).

Also implemented a new feature, the run default, if the flag is active (with the Lua function) the guide will go running to the next node (unless the next node were very close).
2022-07-25 00:14:43 +02:00
Adngel
9d0b690f9f Doc. comments fixes.
Small changes in the documentation comments.
2022-07-24 02:17:21 +02:00
Adngel
614981e771 Implementation of the functions Moveable:Do actions.
Added the new Moveable : Do functions:

- DoGoToNode
- DoGoDirectlyToNode
- DoGoNextNode
- DoWaitForLara
- DoRunDefault

At the moment, only have actions with the guide, but they have a switch structure to include more objects in the future.
2022-07-24 01:38:27 +02:00
Adngel
86da1fcc52 Update MoveableObject.cpp
The real functions are

Moveable:Enable
Moveable:Disable

not

Moveable:EnableItem
Moveable:DisableItem

Comments changed to avoid confusion.
2022-07-18 18:17:41 +02:00
Adngel
6e68330b7b Update Script Reserved
A forgotten step
2022-07-18 09:57:21 +02:00
Adngel
5b9eddc3d5 LUA Functions: ItemFlags get/set, MakeNotTargetable
Added three functions to the LUA collection.

-GetItemFlags (int index)
-SetItemFlags (int index)
-MakeNotTargetable (bool  isNotTargetable = true)

The three must be used with a moveable. Ideally, for enemies and allies.
2022-07-17 11:12:58 +02:00
hispidence
8bc64e12ea Shatter and Explode should not call Destroy 2022-07-16 12:55:22 +01:00
hispidence
ecb868008c Fixed docs 2022-07-16 12:54:57 +01:00
hispidence
0ebf171298 Move UseIfHave to ScriptUtil.h 2022-07-16 12:54:42 +01:00
Lwmte
d039914dbb Set default tint to 1.0f when spawning item in scripts 2022-07-14 19:47:47 +03:00
Lwmte
d9c6aff449 Use ScriptAssert to generate error message 2022-07-12 12:04:23 +03:00
Lwmte
ba15fa8259 More verbose warning about wrong mesh 2022-07-12 11:54:14 +03:00
Lwmte
189a7165e9 Add bounds check for all mesh-related script methods 2022-07-12 11:37:59 +03:00
Lwmte
5350a55af1 Add bounds check for ShatterMesh 2022-07-12 11:28:23 +03:00
Lwmte
12314f8b3f Add Shatter and ShatterMesh methods for moveables, don't crash on GetMoveableByName not getting item 2022-07-12 10:55:35 +03:00
Lwmte
9d98d6f399 Fix merge 2022-07-12 01:28:57 +03:00
Lwmte
8d51228f2f Merge branch 'ten_beta' into lua_funcs 2022-07-12 00:00:45 +03:00
Lwmte
63fe3f0cc3 Save static and moveable colors in savegames 2022-07-11 21:10:41 +03:00
Lwmte
ab423277c7 Update MoveableObject.cpp 2022-07-10 14:37:40 +03:00
Lwmte
53104ff0d3 Update MoveableObject.cpp 2022-07-10 14:35:26 +03:00
Lwmte
22efcc8b72 Use separate funcs for meshswap/unswap, provide additional args 2022-07-09 17:18:55 +03:00
Lwmte
cbe4fe3ec3 Add GetState/SetState, meshswap/visibility funcs, correctly use SetAnim 2022-07-09 14:17:07 +03:00
Lwmte
cfe703b151 Add Explode method for script item 2022-07-07 16:07:13 +03:00
Lwmte
89ee7dd0fe Add GetJointPosition method for moveables 2022-07-06 09:42:39 +03:00
Lwmte
216f29530d Fix incorrect assignment 2022-07-05 23:40:18 +03:00
Lwmte
82132ae405 Implement FindRoomNumber and use it elsewhere 2022-07-05 23:25:42 +03:00
Lwmte
230dac03ca Remove some extremely old comments, rename function for consistency 2022-06-27 22:35:29 +03:00
Lwmte
8ef2351a7c Bugfixes (tier 2) (#539)
* Use spiky gunflash for MP5 if available

* Make order to Test/Touch/Mesh bits in ItemInfo and convert all to uint64 properly

* Fix TR4 sentry gun using wrong rotations after wad conversion

* Fix find and replace error

* Convert ExplodingDeath to also use all 64-bit range

* Fix stack overflow due to strange compiler quirks

* Fix gunflashes for TR4 enemies

* Reorganize sound condition checking to finally resolve all problems

* Remove weird sound play condition casts

* Update ten_savegame.fbs

* Update ten_savegame_generated.h

* Convert meshbits back to 32 bit

* Update Renderer11DrawEffect.cpp

* Enable multiple blend modes for particles, add poisoned particles support

* Reduce max poison potency

* Add debug box output for pathfinding

* Properly clean and restore game and level statistics

* Fix wrong condition in keyhole collision check which led to infinite inventory call

* Fix keyholes again

* Save particles in savegames

* Update tomb4fx.h

* Clean up particle code, save quadbike info in savegames

* Save UPV info in savegames

* Allow quadbike to ride through shallow water

* Update quad.cpp

* Make slowdown dependent on water depth

* Fix epic bug with calculating water depth

* Clean up quadbike water code

* Remove incorrect debug box drawing

* Tidy up current iteration of joint bit helpers

* Customize drag for water and quicksand separately

* Use auto* instead of auto to make code more readable

* Add quadbike hack for ending up in shallow underwater caverns

Co-authored-by: Sezz
2022-06-12 22:01:24 +10:00
Sezz
abc3f2e685 Update tr4_big_scorpion.cpp; name formatting cleanup 2022-05-26 18:44:53 +10:00
hispidence
eb7fad31f3 Fix, update, and regenerate docs. 2022-05-23 21:27:05 +01:00
Sezz
546ab522ca Rename baddie back to baddy 2022-05-14 13:45:21 +10:00
hispidence
ad5a578f9f Set activation mask in Moveable::EnableItem() and switch it off in Moveable::DisableItem(). Fix a crash. 2022-05-13 13:51:36 +01:00
hispidence
fdca3dd6a7 Remove TEN_OPTIONAL_LUA stuff 2022-05-12 22:05:54 +01:00
hispidence
e678d2f64b Move Scripting files so interface and internal files are separated again.
(cherry picked from commit 6f542dde7337ddc633a20537af2e719320dc7ac4)
2022-05-12 21:15:43 +01:00
Renamed from TombEngine/Scripting/TEN/Objects/Moveable/MoveableObject.cpp (Browse further)