How to specify a unit in debug
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
How to specify a unit in debug
I've been using debug mode. I can inspect variables, advance to the next scenario, etc. But I don't know how to change the value of variables related to any specific unit.
For example, the "help" text says
Thanks.
For example, the "help" text says
:unit hitpoints=amount
. How do I specify the unit? Evidently it's not the unit selected on the map. And the unit's id
doesn't work.Thanks.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: How to specify a unit in debug
It should be the selected unit.
Re: How to specify a unit in debug
Thanks. I tried it again. I selected my leader, entered debug mode and typed
hitpoints=100
.It didn't work. I got an error messge: "Unknown command hitpoints=100."
What am I doing wrong?
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Pentarctagon
- Project Manager
- Posts: 5526
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How to specify a unit in debug
The full command is
:unit hitpoints=100
.99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: How to specify a unit in debug
Thank you! That was the problem. I thought "unit" meant something else, not literally the word "unit." Clearly I need to be more literal-minded.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Celtic_Minstrel
- Developer
- Posts: 2166
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: How to specify a unit in debug
As far as I know, these commands apply not to the selected unit but to the unit that's currently under the mouse. These are different things - the selected unit is the one you've clicked on, but you can still then move the mouse over a different unit and set its hitpoints, I believe.