How do i make objects come down and kill people? [Solved]
Moderator: Moderators
-
sniper9191413
- Private Recruit
- Posts: 16
- Joined: Sat Jun 30, 2012 11:01 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
How do i make objects come down and kill people? [Solved]
hi, i am trying to make a map of the droid factory in ep2, but i cant get any of the coveyer belt objects kill people when they come down. is it possible to do that? can you attach a death region to a prop, or can you add animation to the death region? please help
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: how to make objects come down and kill people
maybe you can do it like the airstrike? when the Object come down you start a airstrike with hiden laser and smaler range.
- Locutus
- 1st Lieutenant

- Posts: 420
- Joined: Fri Jun 04, 2010 10:08 am
- Projects :: Stargate Battlefront Pegasus
- Location: Germany
- Contact:
Re: how to make objects come down and kill people
Sure, you just need a timer.
Add something like this to your lua:
function ScriptPostLoad()
[...]
YOURTIMER()
conquest:Start()
[...]
end
function YOURTIMER()
conveyer_timer = CreateTimer("conveyer_timer")
SetTimerValue(conveyer_timer, 30.0)
StartTimer(conveyer_timer)
OnTimerElapse(
function(timer)
PlayAnimation("YOURANIM")
AddDeathRegion("YOURDEATHREGION")
DestroyTimer(timer)
end,
conveyer_timer
)
end
--use this to remove your region
--RemoveRegion("YOURDEATHREGION")
[...]
function ScriptInit()
[...]
Edit: I just realize that sth. like this is set up in the Death Star script:
Add something like this to your lua:
function ScriptPostLoad()
[...]
YOURTIMER()
conquest:Start()
[...]
end
function YOURTIMER()
conveyer_timer = CreateTimer("conveyer_timer")
SetTimerValue(conveyer_timer, 30.0)
StartTimer(conveyer_timer)
OnTimerElapse(
function(timer)
PlayAnimation("YOURANIM")
AddDeathRegion("YOURDEATHREGION")
DestroyTimer(timer)
end,
conveyer_timer
)
end
--use this to remove your region
--RemoveRegion("YOURDEATHREGION")
[...]
function ScriptInit()
[...]
Edit: I just realize that sth. like this is set up in the Death Star script:
Code: Select all
function TrashStuff()
trash_open = 1
trash_closed = 0
trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")
elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end-
sniper9191413
- Private Recruit
- Posts: 16
- Joined: Sat Jun 30, 2012 11:01 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: how to make objects come down and kill people
what exactly would i put for "your timer"
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: how to make objects come down and kill people
A name for your timer. :s
- willinator
- Major

- Posts: 517
- Joined: Sun Mar 13, 2011 3:11 pm
- Projects :: [Coming of the Sentinels]
- xbox live or psn: PC pwns all!
- Location: The rings of Saturn...
Re: how to make objects come down and kill people
What Marth means is that anything can go in that blank, as long as it's consistent. That blank is simply what you call the timer. It could be anything from "timer1" to "chickenwings" to "slartibartfast." It really doesn't matter. What really matters is that you can recognize quickly by looking at the LUA to see what it does, and that you use the same spelling and capitalization throughout the code.
-
sniper9191413
- Private Recruit
- Posts: 16
- Joined: Sat Jun 30, 2012 11:01 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: how to make objects come down and kill people
got it, thanks
EDIT
one more thing, how can i make it so the cis can play as a geonosian. thanks
Double posting is against the RULES; please EDIT your post instead -Staff
EDIT
one more thing, how can i make it so the cis can play as a geonosian. thanks
Double posting is against the RULES; please EDIT your post instead -Staff
- Glitch25
- Sergeant Major

- Posts: 222
- Joined: Mon May 07, 2012 1:01 pm
- Projects :: [ISM] [BFU]
- Location: Baktoid Combat Automata
- Contact:
Re: how to make objects come down and kill people
You would need to create a side mod for that.sniper9191413 wrote:one more thing, how can i make it so the cis can play as a geonosian. thanks
http://swbf-custom.forumactif.com/t164- ... -refresher
Everything you need for your side can be found in the geo side folder.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: how to make objects come down and kill people
He doesn't need to create a custom side, unless he wants a custom Geonosian. You can load the stock Geonosian as shown in the following stock lua:
To make it then playable on the CIS, you can simply replace one of the existing CIS classes in the SetupTeams section, or you can use the following method:geo1c_con.lua wrote:Code: Select all
ReadDataFile("SIDE\\geo.lvl", "gen_inf_geonosian")
Also, please start searching for the answers to any questions you may have first, especially for these basic kind. If nothing turns up (unlikely, if you actually try, given the nearly eight years' worth of extensive resources dedicated to modding SWBF2 that exist on Gametoast), then ask for help.
-
sniper9191413
- Private Recruit
- Posts: 16
- Joined: Sat Jun 30, 2012 11:01 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: how to make objects come down and kill people
thanks, thats all i needed
EDIT
lua crashed, whats wrong?
lua:
Double posting is against the RULES; please EDIT your post instead -Staff
EDIT
lua crashed, whats wrong?
lua:
Hidden/Spoiler:
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: how to make objects come down and kill people
Can you please stop with the constant double posting? I sent you a PM earlier about it. Maybe you should read it.
If there is something wrong with your lua, then it should have appeared as an error(s) in the munge log. Please post it if you cannot interpret and solve the errors for yourself.
One thing is for sure. You have:
If there is something wrong with your lua, then it should have appeared as an error(s) in the munge log. Please post it if you cannot interpret and solve the errors for yourself.
One thing is for sure. You have:
The unit gen_inf_geonosian does not exist in the stock cis.lvl file. How can you load something from the .lvl file that does not contain it? It's not even what I showed you. Also, you have:sniper9191413 wrote:ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"gen_inf_geonosian",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_jangofett",
"cis_hover_aat")
That should be gen_inf_geonosian; it should match what you are actually loading.sniper9191413 wrote:engineer = { "geo_inf_geonosian",1, 4},
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: how to make objects come down and kill people
Yes to piggyback on what AQT said, there is no "gen_inf_geonosian" in the cis .lvl.
You would have to do it like this.
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_jangofett",
"cis_hover_aat")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")
Just copy exactly what I have above into your lua, it should work then.
You would have to do it like this.
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_jangofett",
"cis_hover_aat")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")
Just copy exactly what I have above into your lua, it should work then.
-
sniper9191413
- Private Recruit
- Posts: 16
- Joined: Sat Jun 30, 2012 11:01 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: how to make objects come down and kill people
can someone who knows what they are doing help becasue ARCTroopaNate obviously has no idea. None of your comments help. it just made the game crash
EDIT
here are all my lua now whats wrong?
1
2
3
and 4
EDIT
here are all my lua now whats wrong?
1
Hidden/Spoiler:
2
Hidden/Spoiler:
3
Hidden/Spoiler:
and 4
Hidden/Spoiler:
- Cleb
- Lieutenant General

- Posts: 711
- Joined: Sun Jun 17, 2012 10:12 pm
- Projects :: Learning how to use 3DS Max
- xbox live or psn: ˙. ˙. ˙. ˙. ˙. ˙
- Location: Somewhere
- Contact:
Re: how to make objects come down and kill people
Change that to:sniper9191413 wrote:engineer = { "gen_inf_geonosian",1,4},
Now it should work.engineer = { "geo_inf_geonosian",1,4},
EDIT:
Also, in the ReadDataFile, unless you changed the stock ODF name of the geonodian, it should also be geo_inf_geonosian.
- willinator
- Major

- Posts: 517
- Joined: Sun Mar 13, 2011 3:11 pm
- Projects :: [Coming of the Sentinels]
- xbox live or psn: PC pwns all!
- Location: The rings of Saturn...
Re: how to make objects come down and kill people
First of all, I wouldn't insult people who try to help you. Arctroopa Nate is a competent modder, he knows what he is doing. Just look at the LUA for stock geonosis. Copy how it was set up there, and it should work. Also, are your death regions set up correctly? Is there the correct amount of spacing everywhere? I'm not saying you're stupid, even the best modders make stupid mistakes.
-
sniper9191413
- Private Recruit
- Posts: 16
- Joined: Sat Jun 30, 2012 11:01 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: how to make objects come down and kill people
he started it. , but i just got irritated it kept crashing. sorry arctroopanatewillinator wrote:First of all, I wouldn't insult people who try to help you. Arctroopa Nate is a competent modder, he knows what he is doing. Just look at the LUA for stock geonosis. Copy how it was set up there, and it should work. Also, are your death regions set up correctly? Is there the correct amount of spacing everywhere? I'm not saying you're stupid, even the best modders make stupid mistakes.
it doesnt crash anymore, but the geonosian still is not listed as a troop when i play
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: how to make objects come down and kill people
Um, why are you telling him to change it back to the wrong name?Cleb wrote:Change that to:sniper9191413 wrote:engineer = { "gen_inf_geonosian",1,4},
Now it should work.engineer = { "geo_inf_geonosian",1,4},
He is using the stock geonosian, which is call gen_inf_geonosian... Yeesh!Cleb wrote:Also, in the ReadDataFile, unless you changed the stock ODF name of the geonodian, it should also be geo_inf_geonosian.
- Cleb
- Lieutenant General

- Posts: 711
- Joined: Sun Jun 17, 2012 10:12 pm
- Projects :: Learning how to use 3DS Max
- xbox live or psn: ˙. ˙. ˙. ˙. ˙. ˙
- Location: Somewhere
- Contact:
Re: how to make objects come down and kill people
Whoops.AQT wrote:He is using the stock geonosian, which is call gen_inf_geonosian... Yeesh!
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: how to make objects come down and kill people
Thank you for insulting me sniper9191413, you have really done a great job of ensuring that people will help you in the future. And what did I start? I never said anything to insult you, I simply tried to help you prevent your map from crashing.
Sarcasm aside, I'm not entirely sure what mistake I made and what made the game crash? I've set up a fair amount of lua's and I'm positive what I did was correct.
Do you know how to generate an error log? I would suggest doing that so we can have some more information.
Sarcasm aside, I'm not entirely sure what mistake I made and what made the game crash? I've set up a fair amount of lua's and I'm positive what I did was correct.
Do you know how to generate an error log? I would suggest doing that so we can have some more information.
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: how to make objects come down and kill people
Don't worry. I know about this just as much as you do. I just happen to have my reference. But this isn't the problem here. You made a suggestion that caused sniper9191413 to undo the fix I mentioned earlier, causing him to go one step back in progression. It was just unnecessary and based off of cloudy recollection. So in the future, if you aren't sure about something, then double check the information before you decide to post it. It'll make things less chaotic.Cleb wrote:Whoops.AQT wrote:He is using the stock geonosian, which is call gen_inf_geonosian... Yeesh!Sorry. I'm not even home right now, so I couldn't look it but I seem to have recalled it being geo_inf_geonosian, but I know that you know more than me, so listen to you, not me.
@sniper9191413:
Please do this.AQT wrote:If there is something wrong with your lua, then it should have appeared as an error(s) in the munge log. Please post it if you cannot interpret and solve the errors for yourself.
