Unit dispenser?
Moderator: Moderators
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Unit dispenser?
ok i have still been working on my mod and i wanted a dispenser that will dispense a unit that i made, a mini acklay (0.25 size) i already have the unit but my attempts to use an auto turret dispenser to dispense them has failed miserably (once it actually restarted my whole computer
). i know this had been done before (in magic weapons mod) i just have no idea how to get this working. i just want to be able to let gizor delso call forth an army of baby acklays to chew apart my enemies
MHUHAHAHAH... um i mean just help please
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: unit dispenser?
i knew i have seen this some where else before
thanks for finding me the link again i'll go modify some thing and come back with resaults.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: unit dispenser?
No problem, but the point was you should look in the The FAQ / Everything You Need Thread A LOT more often.Dakota wrote:thanks for finding me the link again
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: unit dispenser?
i know i have been directed there all day today. wow i have been using just the search feature, i think i'll go with the thread from now on...
EDIT: ok i have been testing and i can't seem to get it just right. i have the codes in place and the weapons and it doesn't crash but no units will spawn from my team that i made for it i will now post the luas
LUA
weapon
odf
ORD
EXP
EDIT: ok i have been testing and i can't seem to get it just right. i have the codes in place and the weapons and it doesn't crash but no units will spawn from my team that i made for it i will now post the luas
LUA
Hidden/Spoiler:
odf
Hidden/Spoiler:
Hidden/Spoiler:
Hidden/Spoiler:
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Unit dispenser?
it doesnt work because you skipped the first instruction at the top of the code completely. you have to create a team of which the units are spawned.
so:
additionally, the aigoal for team 5 shouldnt be in the brackets of scriptpostload, it should be below it
next time, when you have a scripting problem you should make a bfront2log and check it for errors.
so:
it should look like this, i supposearcher01 wrote: -- Setup the team that will spawn in ScriptInit(), include the SetTeamAsFriend() stuff
Code: Select all
SetupTeams{
all = {
team = SupportTeam,
units = 8, --Teamsize
reinforcements = -1,
soldier = { "gar_inf_temple_soldier",6, 8},
}
}
SetTeamAsEnemy(SI1, 5)
SetTeamAsEnemy(5, SI1)
SetTeamAsFriend(SI2, 5)
SetTeamAsFriend(5, SI2)
next time, when you have a scripting problem you should make a bfront2log and check it for errors.
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Unit dispenser?
@DarthD.U.C.K.
thanks for the help, i had already made the team but i am an extremly bad coder, also i did check my munge log but it just said that an `)' was expected near `(' so i didn't reallt know what to do and my error log didn't say a thing about it... anyway thanks alot for the help i will go test and come back with some resaults
ok i have been doing more testing and still can't get it working i get the FATAL error saying that the game can't load the .LVL and my munger says that it has an error reading the script
LUA
thanks for the help, i had already made the team but i am an extremly bad coder, also i did check my munge log but it just said that an `)' was expected near `(' so i didn't reallt know what to do and my error log didn't say a thing about it... anyway thanks alot for the help i will go test and come back with some resaults
ok i have been doing more testing and still can't get it working i get the FATAL error saying that the game can't load the .LVL and my munger says that it has an error reading the script
LUA
Hidden/Spoiler:
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Unit dispenser?
You have a munge error, your map is broken and therefore no need to play it, you must fix the errors first.Dakota wrote:...i did check my munge log but it just said that an `)' was expected near `(' so i didn't reallt know what to do and my error log didn't say a thing about it... anyway thanks alot for the help i will go test and come back with some resaults
Without knowing exactly what the error was in your munge log since you didn't completely post it, this jumps out when viewed in Notepad++
and should be:Dakota wrote: LUAHidden/Spoiler:
Code: Select all
function ScriptPostLoad()
TroopSpawnerWeapon = "cis_weap_inf_thermaldetonator_ord"
OnCharacterDispenseControllableTeam(function(character,controlled)
if GetEntityClass(controlled) == GetEntityClassPtr(TroopSpawnerWeapon) then
local SupportTeam = 5 --Team the new spawned character is in (change this)
local teamSize = GetTeamSize(SupportTeam)
for i = 0, teamSize-1 do
local characterIndex = GetTeamMember(SupportTeam, i)
local charUnit = GetCharacterUnit(characterIndex)
if not charUnit then
local destination = GetEntityMatrix(GetCharacterUnit(character))
SpawnCharacter(characterIndex,destination)
end
end
end
end,
SI2 --User team (change this)
)
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Unit dispenser?
i don't have a tutorail and i really really need one i have just been going around the site with the all you need to know thread and the search but thanks for the help.
also i don't have a code editor, can someone please tell me where i can get one, i really need it.
also i don't have a code editor, can someone please tell me where i can get one, i really need it.
- AceMastermind
- Gametoast Staff

- Posts: 3285
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Unit dispenser?
You aren't paying attention to what was posted. I gave you a keyword for the code editor- Notepad++ , now run with it
or look in the Everything You Need Thread, there you will find links to 3 very good free code editors listed.
When I spoke of tutorials(or any instruction) I meant in general, you seem to follow only the parts you want then expect things to work, you need to follow them completely and pay attention to what you're doing, crashing maps are caused by user error.
When I spoke of tutorials(or any instruction) I meant in general, you seem to follow only the parts you want then expect things to work, you need to follow them completely and pay attention to what you're doing, crashing maps are caused by user error.
- Dakota
- Field Commander

- Posts: 991
- Joined: Mon Dec 06, 2010 8:21 pm
- Projects :: making random weapon assets
- xbox live or psn: PS3 beats xbox
- Location: at a computer desk floating around in space
Re: Unit dispenser?
i thought when you said Notepad++ i thought you were just talking about notepad
i'll go work some more and figure some things out bye for now
i'll go work some more and figure some things out bye for now
