• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A Big Newb Problem

Status
Not open for further replies.
Level 4
Joined
Aug 17, 2005
Messages
82
alright ive made it this far but i have problems i cant figure out what i should do so that the items that are created is based on the letters,numbers after the -load kfg47 i always end up with more than 1 item,about 3 of each can anyone tell me what im doing wrong so that it actually checks how many of the letters,numbers are infront of it and not give so many items and all types no matter what...everytime i change the calculations i get either 3,2 or 0 of each.
Loading Trig(P.S Yes i am trying to see if i could make an imatation of a real save/load system :? ) :
Events
Player - Player 1 (Red) types a chat message containing -load kfg47 as A substring
Conditions

Actions
Set a = 1
Set x = 1
Set l = 1
Set h = 1
Set p = 1
Set r = 1
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 1, 11)) Equal to -load kfg47
Then - Actions
Unit - Create 1 ??? for (Triggering player) at (Center of Rect Createload <gen>) facing Default building facing (270.0) degrees
Hero - Set (Last created unit) Hero-level to 10, Hide level-up graphics
For each (Integer a) from a to (Length of (Substring((Entered chat string), 12, 18))), do (Actions)
Loop - Actions
Hero - Create Claws of Attack +15 and give it to (Last created unit)
For each (Integer x) from x to (Length of (Substring((Entered chat string), 12, 18))), do (Actions)
Loop - Actions
Hero - Create Crown of Kings +5 and give it to (Last created unit)
For each (Integer l) from l to (Length of (Substring((Entered chat string), 12, 18))), do (Actions)
Loop - Actions
Hero - Create Kelen's Dagger of Escape and give it to (Last created unit)
For each (Integer h) from h to (Length of (Substring((Entered chat string), 12, 18))), do (Actions)
Loop - Actions
Hero - Create Mask of Death and give it to (Last created unit)
For each (Integer p) from p to (Length of (Substring((Entered chat string), 12, 18))), do (Actions)
Loop - Actions
Hero - Create Orb of Frost and give it to (Last created unit)
For each (Integer r) from r to (Length of (Substring((Entered chat string), 12, 18))), do (Actions)
Loop - Actions
Hero - Create Ring of Protection +5 and give it to (Last created unit)
Else - Actions
Unit - Create 1 Mountain King for (Triggering player) at (Center of Rect 000 <gen>) facing Default building facing (270.0) degrees
Hero - Set (Last created unit) Hero-level to 10, Hide level-up graphics
Thanks in advance. :)
 
Level 6
Joined
Sep 17, 2005
Messages
276
(Length of (Substring((Entered chat string), 12, 18 )): this is ALWAYS the same because Length of...counts the letters between 12 and 18

now i dont know exactly how you want the code loaded.
for example what you write behind the -load kfg47 ???

are they constant on the same place? what are they specific intentions?

please post what parts of the code should exactly load then i would able to help you. this seems to be really doable.... :wink:

btw i dont know if that causes something but use it better so (from is not longer the var itself. changed that to 1 so there is no more need to set vars to 1)

skullslasher said:
For each (Integer l) from 1 to (Length of (Substring((Entered chat string), 12, 18 ))), do (Actions)
PS: smiley problem solved !!!! needs a space behind the 8 ^^
 
Level 6
Joined
Sep 17, 2005
Messages
276
well ok, but use please this mail-address:

[email protected]

maybe you can add a textfile or write it in mail where your problems are and i will have a look.

but it could be that it lasts some days cz im heavily in work this days, but i will find some minutes - hours - DAYS :shock: for you.
 
Status
Not open for further replies.
Top