Commit Graph

66 Commits

Author SHA1 Message Date
SoftCoder 26581a77d2 - first round of cleanup from cppcheck report 2017-10-09 19:09:36 -07:00
titiger 1caf70b517 error counter for scenarios errors 2016-11-28 01:45:00 +01:00
titiger 18af2b7113 Improve error messages for lua scenarios 2016-11-26 15:46:32 +01:00
titison bcb3288d74 setLockedUnitForFaction
*the actual lua function "setLockedUnitForFaction"
2014-11-15 18:30:48 +01:00
titiger cf5da4d2b3 fixed lua function getUnitName; added new lua function getUnitDisplayName 2014-08-09 00:48:04 +02:00
titiger 70e01d5e0b lua commands to shake the cam
-- camera-distance-affected=false
shakeCamera(int shakeIntensity, int shakeDuration) 

-- camera-distance-affected=true
shakeCameraOnUnit(int shakeIntensity, int shakeDuration , int UnitId)
2014-02-04 21:21:06 +01:00
SoftCoder 37494a9c37 - added new LUA method getFactionPlayerType 2014-01-04 09:34:49 -08:00
SoftCoder 853d531d11 - added two new lua methods basxto:
storeSaveGameData(name, value)
string loadSaveGameData(name)
2013-12-30 12:55:59 -08:00
SoftCoder 97d11a9cfd - script manager detected errors don't try to translate the error 2013-12-30 08:17:05 -08:00
SoftCoder fda53f47d1 - bugfix for loading scenarios with their own techs
- all scenario errors are now caught and shown in a messagebox and game can continue.
2013-12-30 02:01:47 -08:00
Mark Vejvoda 4a70fd09e2 added lua method to be able to allow or disallow speed change toggle
void disableSpeedChange();
	void enableSpeedChange();
	bool getSpeedChangeEnabled();
2013-11-07 05:18:21 +00:00
Mark Vejvoda 7ee5d2b300 added a bunch of new lua methods for Tigers new scenario to montior changes to a unit 2013-05-28 00:59:44 +00:00
Mark Vejvoda aa69a5818b added some new lua methods to determine day or night and new event 2013-05-25 20:46:36 +00:00
Mark Vejvoda 505206059b - added new lua method for Muwuum:
void giveStopCommand(int unitId)
	bool selectUnit(int unitId)
	void unselectUnit(int unitId)
	void addUnitToGroupSelection(int unitId,int groupIndex)
	void recallGroupSelection(int groupIndex)
	void removeUnitFromGroupSelection(int unitId,int group)
	void setAttackWarningsEnabled(bool enabled)
	bool getAttackWarningsEnabled()
2012-10-17 20:15:50 +00:00
Mark Vejvoda e63e634e1e - added a bit more lua and updated capture enemy flag 2012-10-13 07:33:33 +00:00
Mark Vejvoda 0180aa6bba - added new lua functions:
triggeredCellEventUnitId()
showMarker(int flashCount, int factionIndex, string note, string textureFile,Vec2i pos)

1. The first one can be called in a cell trigger event and tell you which unit triggered the event
2. The second flashes a position in the minimap
2012-10-13 05:06:53 +00:00
Mark Vejvoda 5c0090d488 - bug fixes for free cell lua functions 2012-10-10 19:56:52 +00:00
Mark Vejvoda 4a63060b71 - added two new lua functions:
networkSetCameraPositionForFaction(int factionIndex,Vec2i pos)
networkSetCameraPositionForTeam(int teamIndex, Vec2i pos)
2012-10-10 18:28:55 +00:00
Mark Vejvoda 84452f8633 - added new cell trigger lua function to be able to detect when any unit enters or exits a region of cells:
int registerCellAreaTriggerEvent(Vec4i pos)
int getCellTriggeredEventAreaEntryUnitId();
int getCellTriggeredEventAreaExitUnitId();
2012-10-10 05:44:14 +00:00
Mark Vejvoda 165f281f92 - added a few new lua functions to check if a cell is free 2012-10-09 20:03:09 +00:00
Mark Vejvoda 7c0e10684a - added lua functions to add / remove cell markers:
addCellMarker(0,'test from scenario!','',cellMarker)
param1=factionindex
param2=cell hint
param3=empty string
param4=cellPosition

removeCellMarker(0,{46,13})
param1=factionindex
param2=cellPosition
2012-09-25 07:05:52 +00:00
Mark Vejvoda 8fd436b612 - added new lua method to play video's in scenarios:
playStaticVideo
2012-05-22 06:17:56 +00:00
Mark Vejvoda 0f25276e6f - applied patch from MuwuM 2012-05-21 20:15:37 +00:00
Mark Vejvoda 5c0db25c86 - added a few new lua methods to register cell 'areas' for unit or for factions for wciwow 2012-05-02 06:07:11 +00:00
Mark Vejvoda dbb116f250 - load of changes to get things compiling under VC++ 2010 (with updated deps seperate for vc2010) 2012-04-20 01:04:05 +00:00
Mark Vejvoda 22f43f4267 - added new lua method for setting the direct position of a unit (can be used for teleporting):
setUnitPosition(int unitId, Vec2i pos)
2012-04-11 05:41:40 +00:00
Mark Vejvoda 152e83399d - added a new lua method isUnitAlive(unitId) 2012-03-31 20:17:19 +00:00
Mark Vejvoda 53d0204cb9 - bugfix network messages 2012-03-31 00:52:43 +00:00
Mark Vejvoda fa31fed5bd - updated to add isGameOver 2012-03-30 14:48:54 +00:00
Mark Vejvoda c02c90427b - added some more lua commands:
vector<int> getUnitsForFaction(factionIndex,commandTypeName, field)
int getUnitCurrentField(unitId)
2012-03-30 07:10:14 +00:00
Mark Vejvoda 45b92f4316 - allow for a scenario based faction to be 'neutral' by specifying a team # of 9
- added some new lua methods:
networkShowMessageForFaction(text,header,int factionIndex)
networkShowMessageForTeam(text,header,teamIndex)
2012-03-30 05:53:33 +00:00
Mark Vejvoda d25fc14244 - added some new 'predictable' random number generation for use in lua scripts 2012-03-27 07:05:07 +00:00
Mark Vejvoda 5cc39e7c53 - added a new type of lua script timer for efficient checking of elapsed time 2012-03-27 06:42:55 +00:00
Mark Vejvoda 4f1bee5aea - attempt to save and load scenario info in saved games 2012-03-26 06:48:58 +00:00
Mark Vejvoda 9d6607a051 - added new lua method so users can create units without spacing rules:
createUnitNoSpacing
2012-02-21 21:56:20 +00:00
Mark Vejvoda ced374410c - added GAE compatible stubs for a few new lua methods 2012-01-05 20:01:22 +00:00
Mark Vejvoda e351def1cb - added new lua function to display playername:
getPlayerName(i)
2012-01-05 00:45:17 +00:00
Mark Vejvoda 6f924b310d - added new lua method to get system macro values:
dofile(getSystemMacroValue("$SCENARIO_PATH") .. "unit.ai.class.lua")
2012-01-05 00:04:55 +00:00
Mark Vejvoda f626ebbe45 - attempt to fix lua code to properly get unit's killer:
lastDeadUnitKillerName
lastDeadUnitKiller
2011-11-18 15:43:05 +00:00
Mark Vejvoda d29293d3cf - added new lua method lastDeadUnitCauseOfDeath, possible int values are:
None = 0
	Attacked = 1
	AttackBoost = 2
	StarvedResource = 3
	StarvedRegeneration = 4
2011-11-16 21:43:19 +00:00
Mark Vejvoda 2d367bd26e - added new lua functions from Muwum:
new events:
    unitAttacked
   unitAttacking
 
   methods:
   lastAttackedUnitName()
   lastAttackedUnit()
   lastAttackingUnitName()
   lastAttackingUnit()
   giveKills(unit,amount)
2011-11-16 21:38:12 +00:00
Mark Vejvoda b2adc16ca6 - added Muwums lua function 2011-11-15 17:39:49 +00:00
Mark Vejvoda 4930ec109d added a new lua method from Muwuum 2011-11-03 18:24:02 +00:00
Mark Vejvoda b126768d9c - updated scenario lua function to allow carry over of factions or not 2011-10-06 20:44:55 +00:00
Mark Vejvoda 2d42f59fe1 - added a new lua function to allow loading a new scenario from inside an existing scenario
loadScenario('capture_the_flag2')
2011-10-06 18:04:59 +00:00
Mark Vejvoda a77606351f - attempt to change scenario timer to use world frames 2011-07-16 03:58:52 +00:00
Mark Vejvoda 97017b2f1f - added a new lua method to add text on the console for Elimnator's scenario. 2011-03-19 12:19:22 +00:00
Mark Vejvoda 4b085691df - added new LUA method togglePauseGame 2011-01-29 23:50:21 +00:00
Mark Vejvoda a5a6cf76d6 - updated some new lua commands 2011-01-29 17:52:53 +00:00
Mark Vejvoda 1a3545f8ab - cleaned up compiler warnings in g3d viewer
- added a bunch of new lua commands for 'da boys' to be documented after being fully tested.
2011-01-29 12:42:18 +00:00