- Joined
- May 1, 2016
- Messages
- 7
Lets start off by saying i don't have anything other then JassHelper to help read this type of coding.
so it's still lines of text. nothing that really color coded or anything like that, so its just lines. And I'm still able to slowly piece everything together as I take it apart. So it takes a bit longer then it use to. I'll Digress to my main point.
StartGame - Trigger named In vJass
I don't want to spawn in a unit, nor do i want the camera functionality
I Already Have a unit (set udg_P1RedHero = gg_unit_H000_0001)
and a camera system already in place
how do i change this up for only 1 player game only with a character already set up in game?
scope StartGame initializer Init
globals
Camera array PlayerCamera
unit array PlayerHero
endglobals
private function StartGame takes nothing returns nothing
local trigger trig
local integer i = 0
local User user
local Equipment equipment
local Inventory inv
local integer array urace
set urace[1] = 'H000'//Want to remove
set urace[2] = 'Obla'//Want to remove
set urace[3] = 'Ulic'//Want to remove
set urace[4] = 'Edem'//Want to remove
loop
exitwhen i == User.AmountPlaying
set user = User.fromPlaying(i)
set PlayerCamera[user.id] = Camera.create()//Want to remove
// create hero - i would like to (set udg_P1RedHero = gg_unit_H000_0001) used instead
set equipment = equipment.create(CreateUnitAtLoc(user.handle, urace[GetHandleId(GetPlayerRace(user.handle))], GetStartLocationLoc(GetPlayerStartLocation(user.handle)), 180))
call UnitAddAbility(equipment.unit, 'A00O')
call UnitAddAbility(equipment.unit, 'A00P')
if (User.Local == user.handle) then
call SelectUnit(equipment.unit, true)
endif
set inv = Inventory.create(equipment.unit)
set PlayerHero[user.id] = equipment.unit
call SetPlayerAllianceStateBJ(Player(bj_PLAYER_NEUTRAL_EXTRA), user.handle, bj_ALLIANCE_ALLIED_VISION)
call SetPlayerAllianceStateBJ(user.handle, Player(bj_PLAYER_NEUTRAL_EXTRA), bj_ALLIANCE_ALLIED_VISION)
set i = i + 1
endloop
endfunction
private function Init takes nothing returns nothing
call StartGame()
endfunction
endscope
Hopefully someone can help me with this...
so it's still lines of text. nothing that really color coded or anything like that, so its just lines. And I'm still able to slowly piece everything together as I take it apart. So it takes a bit longer then it use to. I'll Digress to my main point.
StartGame - Trigger named In vJass
I don't want to spawn in a unit, nor do i want the camera functionality
I Already Have a unit (set udg_P1RedHero = gg_unit_H000_0001)
and a camera system already in place
how do i change this up for only 1 player game only with a character already set up in game?
scope StartGame initializer Init
globals
Camera array PlayerCamera
unit array PlayerHero
endglobals
private function StartGame takes nothing returns nothing
local trigger trig
local integer i = 0
local User user
local Equipment equipment
local Inventory inv
local integer array urace
set urace[1] = 'H000'//Want to remove
set urace[2] = 'Obla'//Want to remove
set urace[3] = 'Ulic'//Want to remove
set urace[4] = 'Edem'//Want to remove
loop
exitwhen i == User.AmountPlaying
set user = User.fromPlaying(i)
set PlayerCamera[user.id] = Camera.create()//Want to remove
// create hero - i would like to (set udg_P1RedHero = gg_unit_H000_0001) used instead
set equipment = equipment.create(CreateUnitAtLoc(user.handle, urace[GetHandleId(GetPlayerRace(user.handle))], GetStartLocationLoc(GetPlayerStartLocation(user.handle)), 180))
call UnitAddAbility(equipment.unit, 'A00O')
call UnitAddAbility(equipment.unit, 'A00P')
if (User.Local == user.handle) then
call SelectUnit(equipment.unit, true)
endif
set inv = Inventory.create(equipment.unit)
set PlayerHero[user.id] = equipment.unit
call SetPlayerAllianceStateBJ(Player(bj_PLAYER_NEUTRAL_EXTRA), user.handle, bj_ALLIANCE_ALLIED_VISION)
call SetPlayerAllianceStateBJ(user.handle, Player(bj_PLAYER_NEUTRAL_EXTRA), bj_ALLIANCE_ALLIED_VISION)
set i = i + 1
endloop
endfunction
private function Init takes nothing returns nothing
call StartGame()
endfunction
endscope
Hopefully someone can help me with this...