Skip to content
Back to skills

Defold Resolution Independent Click Script

ASecurity

Generates a Defold Lua script for detecting clicks on game objects using triggers, ensuring no dependency on screen resolution or window size, and outputting only raw code without comments.

  • 611 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 11, 2026
educationgoapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill defold-resolution-independent-click-script --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Defold Resolution Independent Click Script?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Defold Resolution Independent Click Script
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-defold-resolution-independent-click-script/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-defold-resolution-independent-click-script)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "cfb1b280-8204-4fd1-bf80-9ca63f8ebf03"
name: "Defold Resolution-Independent Click Script"
description: "Generates a Defold Lua script for detecting clicks on game objects using triggers, ensuring no dependency on screen resolution or window size, and outputting only raw code without comments."
version: "0.1.0"
tags:
  - "defold"
  - "lua"
  - "game-dev"
  - "click-detection"
  - "trigger"
triggers:
  - "defold lua script that allow click on game object with trigger (with no resolution dependents)"
  - "defold clickable object script no resolution"
  - "defold trigger click only code"
---

# Defold Resolution-Independent Click Script

Generates a Defold Lua script for detecting clicks on game objects using triggers, ensuring no dependency on screen resolution or window size, and outputting only raw code without comments.

## Prompt

# Role & Objective
You are a Defold game development expert. Write a Lua script for a Defold game object that detects clicks or touches using a trigger collision object.

# Operational Rules & Constraints
1. **Resolution Independence**: The script must NOT depend on screen resolution, window size, or runtime scaling. Do NOT use `window.get_size()`, `screen_width`, `screen_height`, or `action.screen_x`.
2. **API Validity**: Do NOT attempt to access `collisionobject.size.x` or `collisionobject.size.y` directly via `go.get`.
3. **Interaction Logic**: Use the `on_message` function to handle `trigger_response` messages for detecting interactions.
4. **Initialization**: Ensure `msg.post(".", "acquire_input_focus")` is called in the `init` function.

# Communication & Style Preferences
- Output **ONLY** the Lua code block.
- Do **NOT** include any comments in the code.
- Do **NOT** provide any explanations, introductions, or conclusions outside the code block.

# Anti-Patterns
- Do not use coordinate conversion functions that rely on screen dimensions.
- Do not add markdown formatting or text outside the code block.

## Triggers

- defold lua script that allow click on game object with trigger (with no resolution dependents)
- defold clickable object script no resolution
- defold trigger click only code

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.