Log in
Current Version: v0.0.01A
Alpha version
Changelogs to come
Latest topics
Version Progress
Changes for v0.02.0A||||||||||||||||||||[●] [general]
||||||||||||||||||||[●] [Heroes]
||||||||||||||||||||[●] [Items]
||||||||||||||||||||[●] [Bugs]
||||||||||||||||||||[●] [Total]
New Item Buying System
Page 1 of 1
New Item Buying System
.
Last edited by DarkWanderer on Mon Sep 14, 2009 8:27 pm; edited 7 times in total
DarkWanderer- Contributor
- Posts : 122
Join date : 2009-07-19
Re: New Item Buying System
kk, added globals. and tis teh first 4 letters of the items name right?
_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
Not for everything. Some items have the same first 4 letters and Wc3 can't detect spaces in strings; you have to run a loop to check that it does not = all 26 letters. I just used elseifs for whatever doesn't. It's in the buy event script above.
-edit We'll also need the global "button array udg_BuyAll"
-edit We'll also need the global "button array udg_BuyAll"
DarkWanderer- Contributor
- Posts : 122
Join date : 2009-07-19
Re: New Item Buying System
kk, added the global. and kk
_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
Ok, It's finally ready for testing. Now I just need the raw unit type id of the carrier squigs from you.
DarkWanderer- Contributor
- Posts : 122
Join date : 2009-07-19
Re: New Item Buying System
right, need to add that in still XD just a summon spell that summons a unit with an inventory right?
_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
Ok, I've corrected a lot of the bugs that showed up and updated the code in the op post.
Some items were being skipped because it was increasing digit 4 by 1 right after I set it to A or 0 thus skipping right over them.
Btw, the power weapon recipe name needs to be changed from "Power Weapon Recipie" to "Power Weapon Recipe". ( Found that because it didn't end in A or O lol.)
I fixed some other minor issues too with text messages showing when they shouldn't.
Overall, I think the system working and ready to go into the release version of the map. Although, we should definitely still do more playtesting with it to be sure.
I'll continue to improve and update the system as I get time.
Also, don't forget to add your additions again.
O, can you give me the store rect name for each team and the squig unit type id; so, I can put them into the system?
-edit Almost forgot, we need a new string array, "udg_ChatString"
Some items were being skipped because it was increasing digit 4 by 1 right after I set it to A or 0 thus skipping right over them.
Btw, the power weapon recipe name needs to be changed from "Power Weapon Recipie" to "Power Weapon Recipe". ( Found that because it didn't end in A or O lol.)
I fixed some other minor issues too with text messages showing when they shouldn't.
Overall, I think the system working and ready to go into the release version of the map. Although, we should definitely still do more playtesting with it to be sure.
I'll continue to improve and update the system as I get time.
Also, don't forget to add your additions again.
O, can you give me the store rect name for each team and the squig unit type id; so, I can put them into the system?
-edit Almost forgot, we need a new string array, "udg_ChatString"
DarkWanderer- Contributor
- Posts : 122
Join date : 2009-07-19
Re: New Item Buying System
its udg_PlayerCourier[pid] btw for the squig.
and why does the recipe need to be changed?
and how about i post my version of the system, so u can add in my changes, so i dont have to change it *every* time u update
and why does the recipe need to be changed?
and how about i post my version of the system, so u can add in my changes, so i dont have to change it *every* time u update

_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
Good idea, I'll add in the squig and rect changes.
Also, FYI, the "GetUnitWithinRange" native stops giving compile errors if you save the map, exit editor, and save again.
Also, FYI, the "GetUnitWithinRange" native stops giving compile errors if you save the map, exit editor, and save again.
DarkWanderer- Contributor
- Posts : 122
Join date : 2009-07-19
Re: New Item Buying System
it wouldnt let me save thats the thing
and its gg_rct_Spawn1(humans) and Spawn2 (orks)
and its gg_rct_Spawn1(humans) and Spawn2 (orks)
_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
i did this
- Code:
//if triggering player is in team 1 but not within 600 range team 1's shops
if pid < 6 and IsUnitInRangeXY(udg_PlayerHero[pid], GetRectCenterX(gg_rct_Revive1), GetRectCenterY(gg_rct_Revive1), 800) == false and IsUnitInRangeXY(udg_PlayerCourier[pid], GetRectCenterX(gg_rct_Revive1), GetRectCenterY(gg_rct_Revive1), 800) == false then
call DisplayTextToPlayer(p,0,0,"You can't buy anything if you're not at the shops")
set cs =""
set p = null
return
//if triggering player is in team 2 but not within 600 range of team 2's shops
elseif pid > 6 and IsUnitInRangeXY(udg_PlayerHero[pid], GetRectCenterX(gg_rct_Revive2), GetRectCenterY(gg_rct_Revive2), 800) == false and IsUnitInRangeXY(udg_PlayerCourier[pid], GetRectCenterX(gg_rct_Revive2), GetRectCenterY(gg_rct_Revive2), 800) == false then
call DisplayTextToPlayer(p,0,0,"You can't buy anything if you're not at the shops")
set cs =""
set p = null
return
endif
_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
inlcuded bio-regeneration, and bio-mechanical limb
- Code:
// Bio-Mechanical limb
elseif cs == "-b bmec" then
set udg_BoughtItem[pid] = CreateItem('I01X',0,0)
// Bio-Regeneration
elseif cs == "-b breg" then
set udg_BoughtItem[pid] = CreateItem('I029',0,0)
// Mark of Chaos Undevided
elseif cs == "-b mocu" then
set udg_BoughtItem[pid] = CreateItem('I020',0,0)
// Mark of Khorne
elseif cs == "-b mok" then
set udg_BoughtItem[pid] = CreateItem('I037',0,0)
// Mark of Nurgle
elseif cs == "-b mon" then
set udg_BoughtItem[pid] = CreateItem('I035',0,0)
// Mark of Slaanesh
elseif cs == "-b mos" then
set udg_BoughtItem[pid] = CreateItem('I033',0,0)
// Mark of Tzeench
elseif cs == "-b mot" then
set udg_BoughtItem[pid] = CreateItem('I031',0,0)
_________________
warning! very-stubborn, sarcastic, self-important, argumentative developer detected!
And unto the masses, He doth spoke:
"Behold The Stuff! It Is Good!"
And the Stuff was good.
Heroes:
Commander Farsight (colab - implemented) - Ku'gaath Plaguefather(incomplete) - Ilyana Arienal(incomplete) - Harlequin Shadowseer(incomplete) - Modular Tau Battlesuit(sandbox)
Re: New Item Buying System
I've updated op with the new code; try it out and see what you think.
I think the hotkeys are a major improvement.
I think the hotkeys are a major improvement.
DarkWanderer- Contributor
- Posts : 122
Join date : 2009-07-19

» Does anyone know why the "Pupil" system isnt working
» Requesting a Charged Collection item
» Item Guide--Name and Gifting Level
» Orions Magical Wokshop ITEM LIST
» Chess Rating Management System
» Requesting a Charged Collection item
» Item Guide--Name and Gifting Level
» Orions Magical Wokshop ITEM LIST
» Chess Rating Management System
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
» Faction creeps
» [SCII] [Inquisition] Hector Rex
» [necrons] Orikan, the Diviner
» Talent System
» Capture Points system
» [SCII] [Orks] Warboss(es)
» Game Guide
» [Inquisition] Mordrak
» [inquiition] Kaldor Draigo