Scripting Marines!?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 652
- Joined: Sat, 25. Apr 09, 11:06
Scripting Marines!?
Hi there guys,
I need some advice for scripting marines with specific skills ( in particular: Each skill on level 3 ). I tried myself and came to the conclusion that I'm a total noob in scripting.
I used the Search but didn't find anything.
Thanks in advance
Feloidea
I need some advice for scripting marines with specific skills ( in particular: Each skill on level 3 ). I tried myself and came to the conclusion that I'm a total noob in scripting.
I used the Search but didn't find anything.
Thanks in advance
Feloidea
-
- Posts: 22486
- Joined: Sat, 23. Apr 05, 21:42
Re: Scripting Marines!?
Funny, I opened a Sticky thread called [url=http://forum.egosoft.com/viewtopic.php?t=216690]TC Download Library[/url], and told the browser to find "Marine" on page. Two "Marine trainer" entries did turn up right away. If they do not contain code to set skill attributes, ...Feloidea wrote:I used the Search but didn't find anything.
And naturally the Cheap pack is in that Library too, and also in tc cheats.
-
- Posts: 652
- Joined: Sat, 25. Apr 09, 11:06
Well I didn't thought of a downloadable script, but one I can make and use in short with the ingame-script-editor.
Like the money cheat
add money to player <->
return playership
Just with marines
add <-> marines to playership
set marine skill level fight to <->
set marine skill level mechanics to <->
set marine skill level hacking to <->
set marine skill level engineering to <->
return playership
Just that I need help with the first line.
I apologize for having been clear on that issue.
Thanks
Feloidea
Like the money cheat
add money to player <->
return playership
Just with marines
add <-> marines to playership
set marine skill level fight to <->
set marine skill level mechanics to <->
set marine skill level hacking to <->
set marine skill level engineering to <->
return playership
Just that I need help with the first line.
I apologize for having been clear on that issue.
Thanks
Feloidea
-
- Posts: 652
- Joined: Sat, 25. Apr 09, 11:06
Great, thanks. How do I do that exactly. I think I found the line doing that but I can ...Cycrow wrote:to add marines, you must first create a passenger on a ship, with there name
1.) Not write, for example Bolo Hi, just BoloHi. That's a bit, ... annoying.
2.) Why define the face and voice, if it's just a common passenger, I mean it's not like that I could speak to them before, or did I miss something?
May someone just give an adaptable example, leaving me only to finally change the name or so. That'd be lovely!
Thanks in advance.
Feloidea
-
- Moderator (Script&Mod)
- Posts: 22423
- Joined: Sun, 14. Nov 04, 23:26
passengers are used for various things, including pilots for ships and such like, so they need voices and faces for some of these things.
obviously if u just need a marines, it really doesn't matter which ones they use, but they still need to be set.
this might help you, from one of the offical scripts, !galaxyedit.obj.addmarine
u should be able to create a name with spaces in, if u want to specify the name yourself, you can assign it to a string first
make sure you set the value as a "String" and not a "Varible"
EDIT: if you want to randomise what race they are, u could add this
obviously if u just need a marines, it really doesn't matter which ones they use, but they still need to be set.
this might help you, from one of the offical scripts, !galaxyedit.obj.addmarine
Code: Select all
007 |$name = get random name: race=$race
008 |$face = = random value from 0 to 4 - 1
009 |$voice = = random value from 0 to 4 - 1
010 |$passenger = [THIS] -> create passenger in ship: name=$name race=$race voice=$voice face=$face
011 |if $passenger -> exists
012 ||if $exp
013 |||$fight = = random value from 50 to 101 - 1
014 |||$hacking = = random value from 50 to 101 - 1
015 |||$mechanical = = random value from 50 to 101 - 1
016 |||$engineering = = random value from 50 to 101 - 1
017 |||$passenger -> create marine from passenger: fighting=$fight hacking=$hacking mechanical=$mechanical engineering=$engineering
018 ||else
019 |||$passenger -> train passenger to marine
020 ||end
Code: Select all
$name = 'Bolo Hi'
EDIT: if you want to randomise what race they are, u could add this
Code: Select all
$aRaces = create array with arguments, Argon, Boron, Teladi, Paranid, Split
$race = get array size $aRaces
$race = get random number from 0 to $race
$race = $aRaces[$race]