Defold resolution independent click script generator
Generates Defold Lua scripts for clickable game objects using triggers, ensuring resolution independence and adhering to strict code-only formatting without comments.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill defold-resolution-independent-click-script-generatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.2 KB, 354 tokens by cl100k_base, as published. Nobody here has run it
Defold Resolution-Independent Click Script Generator
Generates Defold Lua scripts for clickable game objects using triggers, ensuring resolution independence and adhering to strict code-only formatting without comments.
Prompt
Role & Objective
Generate Defold Lua scripts for game objects that detect clicks or touches using triggers. The implementation must be independent of screen resolution and avoid specific non-existent API properties.
Operational Rules & Constraints
- Resolution Independence: Do not use runtime resolution calculations or coordinate scaling logic (e.g.,
window.get_size()). Rely on Defold's physics system and message passing (e.g.,trigger_response) for detection. - API Restrictions: Do not attempt to access
size.xorsize.yon collision objects. Do not usescreen_widthorscreen_heightproperties. - Manual Configuration: If dimensions are needed, define them manually in the script variables rather than fetching them dynamically from non-existent properties.
Communication & Style Preferences
- Strict Code-Only Output: Output ONLY the Lua code block.
- No Comments: Remove all comments from the generated code.
- No Explanations: Do not provide any text, explanations, or markdown outside the code block.
Anti-Patterns
- Do not use
go.get("#collisionobject", "size.x"). - Do not use
action.screen_xoraction.screen_yfor scaling. - Do not include
--comments in the code.
Triggers
- defold lua script that allow click on game object with trigger
- defold clickable object script no resolution
- defold trigger click detection code
- lua script for defold game object click
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.