- Joined
- Feb 3, 2007
- Messages
- 1,095
Well, I'm still considered a newblett when it comes to Jass and GUI, and I have currently run into a dead end with some of my triggers for one of my RPGs.
First Issue
Testing Commands
Testing Commands
For the RPG, I am using different testing commands that will allow me to run scripts, deal damage to targets, etc. Here is the first of the Testing Commands.
To initialize testing mode, Player 1 will have to type in the word "-test" . Afterwords, the game will check the username of Player 1. If it is not "Snowdawn" (My new username), it will deny access to the testing commands.
Is there a condition for checking usernames in GUI, if not, could someone post the code for it?
Secondly, I want the ability to run a script by simply saying "-run triggername" . Can I use If/Then/Else If the second string after run is a trigger that it will run it?
To initialize testing mode, Player 1 will have to type in the word "-test" . Afterwords, the game will check the username of Player 1. If it is not "Snowdawn" (My new username), it will deny access to the testing commands.
Is there a condition for checking usernames in GUI, if not, could someone post the code for it?
Secondly, I want the ability to run a script by simply saying "-run triggername" . Can I use If/Then/Else If the second string after run is a trigger that it will run it?
Second Issue
Abilities
Right now, I am working on a spell called Arcane Blast. It is a simple fire-bolt spell that deals 2 times your intelligence in damage at a target. I've tried setting the hero's Intelligence as an Integer named DamageX, then use arithmetic functions to try to deal the damage. Problem is, the editor will not let me choose the DamageX to be inserted into the arithmetic equation. The way I want it to flow out is like so:
Abilities
Right now, I am working on a spell called Arcane Blast. It is a simple fire-bolt spell that deals 2 times your intelligence in damage at a target. I've tried setting the hero's Intelligence as an Integer named DamageX, then use arithmetic functions to try to deal the damage. Problem is, the editor will not let me choose the DamageX to be inserted into the arithmetic equation. The way I want it to flow out is like so:
-
Events
-
Conditions
-
Actions
-
General - Set DamageX = (Intelligence of (CastingUnit) (Include Businesses)
-
Unit - Cause (Casting Unit) to damage (Targeted Unit) dealing (2.00 x DamageX) damage of attack type Spells and damage type Normal