Opened 9 years ago
Last modified 5 years ago
#2950 new enhancement
[PATCH] Extend / Improve Trigger functionality
Reported by: | Niek | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Backlog |
Component: | Simulation | Keywords: | patch triggers |
Cc: | tjh.hts@… | Patch: |
Description (last modified by )
With my recent work on Triggerscripting, it appears to me that the Trigger workflow (includes Triggerhelper.js) could use some additional functionality to ease scripting.
This includes (but is not limited to): Pre-written functions for:
- Adding resources to players.
- Pushing GUI notifications.
- Supporting cinematics.
- Enable/disable training of certain templates.
- Changing unit stats.
Enhancing:
- GUI dialog to allow for distinguishing multiple windows (possibly by allowing to set a button id to which can by checked against in the trigger code).
- allowing for AI's and Triggerscripts to communicate with each other (not necessarily the AI code itself, but the ability to do so)
This list is not quite complete and more additions to the list would be appreciated.
Attachments (1)
Change History (14)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
by , 9 years ago
Attachment: | GuiNotification.patch added |
---|
comment:3 by , 9 years ago
Keywords: | patch review added |
---|---|
Summary: | Extend / Improve Trigger functionality → [Patch] Extend / Improve Trigger functionality |
comment:4 by , 9 years ago
It doesn't allow completely versatile messages with internationalisation support, like those used here: http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/Player.js#L214
And when it would, I think the function would become too complicated.
So I think either the notification object should be passed directly, or the function should indeed be dumbed down to a certain level, but then it's debatable to what level.
comment:5 by , 9 years ago
Cc: | added |
---|
comment:6 by , 9 years ago
Milestone: | Alpha 18 → Alpha 19 |
---|
follow-up: 8 comment:7 by , 9 years ago
Adding resources is already possible with:
var cmpPlayer = TriggerHelper.GetPlayerComponent(playerID); cmpPlayer.AddResources({ wood: 100, stone: 100, metal: 100, food: 100 });
And same is
cmpPlayer.SetDisabledTemplates({template1: true, template2: true});
for disabling templates
comment:8 by , 9 years ago
comment:9 by , 9 years ago
Keywords: | review removed |
---|
As already noted by sanderd17 the message change isn't really working.
comment:10 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
comment:12 by , 8 years ago
Summary: | [Patch] Extend / Improve Trigger functionality → [PATCH] Extend / Improve Trigger functionality |
---|
comment:13 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
A patch for the GUI notification