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
2 posters
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
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
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?
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
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)
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
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)
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
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Thu Mar 05, 2020 5:09 am by Occuli.Imperator.Aquillon
» Faction creeps
Sun Dec 21, 2014 12:49 am by Grass Hopper
» [SCII] [Inquisition] Hector Rex
Thu Dec 18, 2014 9:06 am by Grass Hopper
» [necrons] Orikan, the Diviner
Tue Dec 16, 2014 5:58 pm by Grass Hopper
» Talent System
Mon Dec 15, 2014 10:59 am by Grass Hopper
» Capture Points system
Fri Dec 12, 2014 2:36 pm by Grass Hopper
» [SCII] [Orks] Warboss(es)
Fri Dec 12, 2014 11:44 am by Grass Hopper
» Game Guide
Thu Dec 11, 2014 2:12 pm by Grass Hopper
» [Inquisition] Mordrak
Wed Dec 10, 2014 3:28 pm by Grass Hopper
» [inquiition] Kaldor Draigo
Wed Dec 10, 2014 3:07 pm by Grass Hopper