
ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 9, 2010 06:42 PM
Msg. 1 of 26
Hello peoples.
I'm new in this forum and new to HaloCe Modding. Im not totally a beginner i modded a few things too but, now i started scripting and i got problems.
A Few things i have tried out, they work fine. For now i can script, that AI spawns if i walk in an trigger volume, or an Effect happens if i go into a trigger volume. But now i want to try that vehicle_load_magic script.
For now i want that a Grunt go into a C_gun Turret by vehicle_load_magic script. I created and named the Turret, then i created an AI Encounter and an Squad.
I didn't put a tick into: Not Initially Created, cuz i want that the grunt is already there, just forced to go into the turret, if the maps starts.
Well, my Vehicle name is: c_turret1
Encounter name is: turret_grunts
And Squad name is: turret1_grunt
This is my Script that i wrote:
(script startup turret_grunts (vehicle_load_magic c_turret1 GT-gunner (ai_actors turret_grunts/turret1_grunt))
In Sapien it said: scripts successfully compiled. But when i starts the map, the grunt just stand there and dont enter the vehicle.
Map is: a30
I tried other scripts to, e.g: an AI Dropship, but didn't worked too, i tried the Recorded_Animations from a30 but i dont know how i set it up that, if i walk into a trigger volume then the Dropship spawns, the AI's automatically enter the vehicle then the Dropship flys and drop enemies, then fly away. This is my biggest problem. Nothing works. i tried to Copy some scripts from the original scrips of a30, and named the vehicles like the original, sapien said that the scripts were successfully compiled but nothing happens. I think my map dont accept scripts anymore or i just do something wrong??
Would be nice if someone help me to the 2 Problems.
Thanks in Advance.
P:S: Sorry if i wrote so much :D, but i really need help with scripting.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 9, 2010 08:08 PM
Msg. 2 of 26
I don't know if it would affect it but, you should need "" in the seat name:
(script startup turret_grunts (vehicle_load_magic c_turret1 "GT-gunner" (ai_actors turret_grunts/turret1_grunt)) )
|
|
|

Co1t3r
Joined: Dec 13, 2008
|
Posted: Apr 9, 2010 08:36 PM
Msg. 3 of 26
Are you sure the scripts compiled? If Sapien doesn't find a .hsc file, it will automatically tell you scripts successfully compiled.
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 10, 2010 09:23 AM
Msg. 4 of 26
I tried it with:
(script startup turret_grunts (vehicle_load_magic c_turret1 "GT-gunner" (ai_actors turret_grunts/turret1_grunt)) )
then i save it as a .hsc file. So im sure that the scripts are compiled but it still dont work. hmm maybe i destroyed something from the campaign map. I deleted all things in there, like the: Trigger Volumes, Encounters (AI). Cuz i thought it's not needed cuz i want my own mods in the map. So now there are just my own Trigger Volumes, and Encounters there. Maybe this is the prob ??? Or not ?
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 10, 2010 11:53 AM
Msg. 5 of 26
If the turret is just a single seater, replace "GT-gunner" with "". Try entering: (vehicle_load_magic c_turret1 "" (ai_actors turret_grunts/turret1_grunt))
into the Sapien console. If it returns 0, then the grunt is unable to enter the vehicle due to animation constraints.
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 10, 2010 02:37 PM
Msg. 6 of 26
Ok i wrote in the sapien console ur code: (vehicle_load_magic c_turret1 "" (ai_actors turret_grunts/turret1_grunt))
then it returns to 1 and the grunt enter the turret.
Then i wrote the same script in the text editor, saved as .hsc compiled scripts (it said succesfully compiled) then i tested it. But in ingame it wont work. Then i tested it again with
(vehicle_load_magic c_turret1 "GT-gunner" (ai_actors turret_grunts/turret1_grunt))
but still dont work, the grunt won't enter the turret :(. Just in sapien it works.
What can i do ? i'm at despair.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 10, 2010 02:47 PM
Msg. 7 of 26
Paste the script you compiled.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 10, 2010 02:59 PM
Msg. 8 of 26
Does your grunt spawn in-game?
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 10, 2010 03:52 PM
Msg. 9 of 26
This is my currently script i compiled: (script startup turret_grunts (vehicle_load_magic c_turret1 "GT-gunner" (ai_actors turret_grunts/turret1_grunt)) )
And before i had the "" instead of "GT-gunner" but it works both not.
And yes, my grunt spawning, but does not enter the turret.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 10, 2010 04:55 PM
Msg. 10 of 26
is your script in HaloCEDirectory\data\levels\yourmapname\scripts or halocedirectory\data\levels\test\yourmapname\scripts ? It needs to be in either one of those areas.
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 10, 2010 05:16 PM
Msg. 11 of 26
it's in HaloCEDirectory\data\levels\a30\scripts
|
|
|

Maniac1000
-Helpful Poster-
Joined: Feb 24, 2007
|
Posted: Apr 10, 2010 06:29 PM
Msg. 12 of 26
Dont scripts go in tags/blah/blah/scripts ?
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 10, 2010 07:01 PM
Msg. 13 of 26
Ok guys i found my Problem. Sapien dont compile scripts in my map anymore. I tested it. I wrote a Script with an command that cant work. Saved it as a .hsc file, checked if Sapien tell me any problem with the script, but it says: scripts successfully compiled.
I wrote in the script: (game_KILL) LLALALALLAA. This is an command that cant never work :D.
But now i need really help. How i fix this or what i can do that it work again.
Maybe it's the problem that i added to many .hsc files in scripts folder??? Cuz i dont put all scripts in one .hsc file, i create for every script a new .hsc file. Is this the problem ???
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 10, 2010 07:32 PM
Msg. 14 of 26
Maybe, Sapien can only load 7 .hsc files in one map.
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 10, 2010 08:37 PM
Msg. 15 of 26
Are u sure or u just think it ??? :/
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 10, 2010 08:52 PM
Msg. 16 of 26
Quote: --- Original message by: Maniac1000 Dont scripts go in tags/blah/blah/scripts ? No, scripts belong in the data folder.
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 10, 2010 10:14 PM
Msg. 17 of 26
How many .hsc files do you have? You only really need 1. Just put all your scripts into one file. I believe somewhere it is stated you can only have around 6-7.. Edited by deadlyfighter1000 on Apr 10, 2010 at 10:15 PM
|
|
|

sierra117
Joined: Jan 10, 2008
If sex is good exercise, why are there fat sluts?
|
Posted: Apr 10, 2010 10:50 PM
Msg. 18 of 26
since ur script file is in 'data\levels\a30\scripts' is your scenario in 'tags\levels\a30' ?
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 11, 2010 06:43 AM
Msg. 19 of 26
Quote: --- Original message by: deadlyfighter1000
How many .hsc files do you have? You only really need 1. Just put all your scripts into one file. I believe somewhere it is stated you can only have around 6-7.. Edited by deadlyfighter1000 on Apr 10, 2010 at 10:15 PM I have 10 - 11 .hsc files i think. But if i put all in one, how i do this ?? cuz the first line is (script startup then, and then all scripts begin at the same time or ??? Im script beginner, it's a bit confusing for me then if i put all in one .hsc file i think. And yes, my scripts are in data\levels\a30\scripts, and my scenario in tags\levels\a30. Well, thanks in advance deadlyfighter1000, later i'll try it i make the encounters new and the scripts too. I'll post here if it worked or not ;). Edited by ReeZe on Apr 11, 2010 at 06:44 AM
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 11, 2010 10:19 AM
Msg. 20 of 26
Okay, you have your scripts:
(script startup (whatever) )
And in another .hsc file you have:
(script startup (whatever) )
Basically, just merge them so it would look like this:
(script startup cool (whatever) ) (script startup random (whatever) )
And it will work like that. Also yes, the scripts will start at the same time. Edited by deadlyfighter1000 on Apr 11, 2010 at 10:20 AM
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 11, 2010 11:14 AM
Msg. 21 of 26
Ok done it works now fine. But, now i have other problem.
My mod plays on the map a30, and a30 got 2 BSP's. So i modded both BSP's a bit now. To switch the bsp's i press ctrl+b then i choose my BSP. So there are too grunts which should enter turrets. In the first BSP they spawning, but when i choose the 2nd BSP, this message shows up in sapien:
WARNING: encounter turret_grunts could be ambiguously attached to BSPs #0 and #1.
And they dont spawn in the 2nd BSP. Now i thought it's just in Sapien. So i compiled my scripts and the map. But when i compile the map this message comes too. So now i tested my map in haloce. It works fine on the first BSP, but the 2nd BSP starts if u get out of the tunnel where u must activate the light bridge. So the 2nd level part isnt there. It's like in sapien. In Sapien u must press ctrl+b to see the other bsp, but how i fix this that i can play the whole map???
Now i can only play at the first level part. Level part 2 isnt there o.O?????
plz help :/
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 11, 2010 03:15 PM
Msg. 22 of 26
Okay, for the bsp switch, you need to create a script to switch BSPs, the bsp switch command is:
switch_bsp bspnumber
For example:
(script startup bspswitch (sleep_until (= (volume_test_objects bspswitchlocation (players)) 1) 0) (switch bsp 1) )
You're going to need to use some sort of way to switch bsps like the method I showed: (sleep_until (= (volume_test_objects bspswitchlocation (players)) 1) 0) (switch bsp 1)
This causes it to wait until the player enters bspswitchlocation and then switches the bsp. I don't have much experience with BSP switching (I've never done it before) so I don't know much else. If you want you can add me on Xfire (Despair009) and I can explain it better through there. (If you have it) Edited by deadlyfighter1000 on Apr 11, 2010 at 03:21 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 11, 2010 03:33 PM
Msg. 23 of 26
@ deadlyfighter1000 The (= [condition] 1) around the volume_test_objects is redundant. Volume_test_objects automatically returns a boolean, and it isn't necessary to add the (= 1) around it. As for BSP switching, it's far more simplistic to use a trigger volume named bsp1,0
This will switch to the second BSP from the first BSP once you enter it. Then, you could create a second trigger volume named bsp0,1
which would switch back to the first BSP from the second if you were to go backwards.
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 11, 2010 05:24 PM
Msg. 24 of 26
Hey Gamma and deadlyfighter. Thanks for the help ;). I'll try it out, and i added u on Xfire deadlyfighter, we can talk about the prob there again ;). But now i need again help.
So i loaded up the recorded animations of the a30 map. Then i added a Dropship called lz_cship, and and encounter which the dropship should drop then.
I tested all and typed the commands in the sapien console. Works fine!
But now i want to write my script. I named the script bspswitch, added then all the commands which the dropship should do then, with: recording_play_and_hover etc etc...
the commands was all right, cuz i tested them in sapien. But when i try to compile the scripts ever a other LINE makes trouble........
now i tried it from the beginning.
First i wrote:
(script startup bspswitch (unit_close lz_cship) )
then i saved as an .hsc file and compiled to see if any line makes trouble. But it compiled successfully.
then i wrote:
(script startup bspswitch (unit_close lz_cship) (vehicle_load_magic lz_cship "passenger" (ai_actors spec_ops/spec_ops_elites) )
then saved again and see if a line makes trouble. Then when i tried to compile this message comes:
recompiling scripts after scenarios were merged. this left parenthesis is unmatched.: (script startup bspswitch
it's line one: (script startup bspswitch
Why it works now not ???? when i had just:
(script startup bspswitch (unit_close lz_cship) )
it works and then i add a other command it works not.,......
I tried the command: (vehicle_load_magic lz_cship "passenger" (ai_actors spec_ops/spec_ops_elites) in the SAPIEN CONSOLE there it worked fine. Why does it not work in the script ??? .......
|
|
|

deadlyfighter1000
Joined: Jan 11, 2009
Constantly a threat.
|
Posted: Apr 11, 2010 05:27 PM
Msg. 25 of 26
(script startup bspswitch (unit_close lz_cship) (vehicle_load_magic lz_cship "passenger" (ai_actors spec_ops/spec_ops_elites)) )
You need the extra bracket I put in there. Because it has two at the beginning.
(vehicle_load_magic lz_cship "passenger" (ai_actors spec_ops/spec_ops_elites))
|
|
|

ReeZe
Joined: Apr 9, 2010
|
Posted: Apr 11, 2010 06:57 PM
Msg. 26 of 26
ok thanks ;), got it now.
|
|
|