complied respawn script

Discuss Halo 2 modding, progress on figuring things out, mapfiles...you know the drill. Cheating discussion not allowed.
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

complied respawn script

Post by fuzzman »

okay ive added the flood human and elite ai to turf.map. evrythings working well. then i ovewrite one of the exsisting scripts in the level with an ai sqaud respawn script. evrythings all good until i kill the last member of the squad, then the game freezes. any help is appreciated
User avatar
AFuzySquirrel




Wordewatician 250

Posts: 362
Joined: Fri Jun 22, 2007 9:04 pm

Post by AFuzySquirrel »

dont overwrite scripts in the map... add more to it.. also tell what all you did to the map... cuz many things could cause that
Image
[Setting BIPD Variations][url=httphttp://forums.halomods.com/viewtopic.php?search_id=442547533&t=67770][Alumina BETA][/url]
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

well what i did to the map was add the marine, elite, flood human,and flood elite bipeds. then i added the backwash sky and edited the fog patch.then i added ai to the the flood bipeds. they work in all, no sound issues, but like i said before, when i kill the last memeber of the squad thats using the respawn script, the game freezes
User avatar
AFuzySquirrel




Wordewatician 250

Posts: 362
Joined: Fri Jun 22, 2007 9:04 pm

Post by AFuzySquirrel »

well.. to me its a script problem... it wont respwan so i suggest adding a scrip space to the map then changing it
Image
[Setting BIPD Variations][url=httphttp://forums.halomods.com/viewtopic.php?search_id=442547533&t=67770][Alumina BETA][/url]
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

what do you mean, a script space?
User avatar
Shadowz_O_Death




Connoisseur

Posts: 188
Joined: Wed Nov 01, 2006 8:38 am
Location: Pittsburgh, PA Xlink: Shadowz_O_Death

Post by Shadowz_O_Death »

1. Follow my tutorial on properly injecting scripts.
2. Download the latest Entity SCNR (Scenario) plugin.
3. Copy the latest Entity SCNR (Scenario) plugin into the Plugins/Halo 2/ent folder of Entity, replacing the pre-existing Entity SCNR (Scenario) plugin.
4. Open Entity.
5. Open the map you wish to inject a respawn script into.
6. Navigate to the SCNR (Scenario) tag.
7. Under "AI Squads," change "Script" to the name of the respawn script that you have injected (notice I said under "AI Squads," not under "Spawning Locations").
8. Click "Save."
9. Close Entity.

Good luck!

Regards,
Shadowz_O_Death
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

well ive tried useing my injected script under AI Squads, yet ive had no luck =/ im beginning to think my problem lies within a reflexive other than the AI Squads or AI suad types. i tihnk maybe i should add more reflexives from a campaigne map
User avatar
Shadowz_O_Death




Connoisseur

Posts: 188
Joined: Wed Nov 01, 2006 8:38 am
Location: Pittsburgh, PA Xlink: Shadowz_O_Death

Post by Shadowz_O_Death »

fuzzman wrote:well ive tried useing my injected script under AI Squads, yet ive had no luck =/ im beginning to think my problem lies within a reflexive other than the AI Squads or AI suad types. i tihnk maybe i should add more reflexives from a campaigne map
Did your mod work before you added the scripts?
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

yea it worked. but im useing turf.map so i figured it would be easier to overwrite one of its prexisting scripts
User avatar
Shadowz_O_Death




Connoisseur

Posts: 188
Joined: Wed Nov 01, 2006 8:38 am
Location: Pittsburgh, PA Xlink: Shadowz_O_Death

Post by Shadowz_O_Death »

fuzzman wrote:yea it worked. but im useing turf.map so i figured it would be easier to overwrite one of its prexisting scripts
I hope you backed up the map before you injected the respawn scripts into the map. If so, inject the respawn scripts into the map that you've backed up using my tutorial. It doesn't require you to clone chunks or replace pre-existing scripts.

Regards,
Shadowz_O_Death
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

yea i backed it up, and well i would use your tutorial, but theres only one problem, i cant decomplie my map, it always gives me an exception in H2Core =/
User avatar
Shadowz_O_Death




Connoisseur

Posts: 188
Joined: Wed Nov 01, 2006 8:38 am
Location: Pittsburgh, PA Xlink: Shadowz_O_Death

Post by Shadowz_O_Death »

fuzzman wrote:yea i backed it up, and well i would use your tutorial, but theres only one problem, i cant decomplie my map, it always gives me an exception in H2Core =/
Ahh, damn H2Core. Sorry, I don't know what to tell you. Perhaps your script syntax is incorrect. What script(s) are you using? Also, what is the name of the AI Squad(s) that you're trying to respawn?

Regards,
Shadowz_O_Death
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

im using the following script to respawn my first squad, "flood_elites"

Code: Select all

(script continuous Respawn_AI 
  (begin 
   (sleep_until (<= (ai_living_count flood_elites) 0)) 
   (sleep (* 5 30)) 
   (ai_place flood_elites)
  )
)
User avatar
Shadowz_O_Death




Connoisseur

Posts: 188
Joined: Wed Nov 01, 2006 8:38 am
Location: Pittsburgh, PA Xlink: Shadowz_O_Death

Post by Shadowz_O_Death »

fuzzman wrote:im using the following script to respawn my first squad, "flood_elites"

Code: Select all

(script continuous Respawn_AI 
  (begin 
   (sleep_until (<= (ai_living_count flood_elites) 0)) 
   (sleep (* 5 30)) 
   (ai_place flood_elites)
  )
)
Everything seems to be good. Sorry man, I don't know what to tell you. Give me the mod and I'll take a look at it.

Regards,
Shadowz_O_Death
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

ok ill send it to u in a pm in sppf format.
User avatar
AFuzySquirrel




Wordewatician 250

Posts: 362
Joined: Fri Jun 22, 2007 9:04 pm

Post by AFuzySquirrel »

Shadowz_O_Death wrote:
fuzzman wrote:im using the following script to respawn my first squad, "flood_elites"

Code: Select all

(script continuous Respawn_AI 
  (begin 
   (sleep_until (<= (ai_living_count flood_elites) 0)) 
   (sleep (* 5 30)) 
   (ai_place flood_elites)
  )
)
Everything seems to be good. Sorry man, I don't know what to tell you. Give me the mod and I'll take a look at it.

Regards,

Shadowz_O_Death
see were it says "Respawn_AI" replace that with your squad name :wink:
Image
[Setting BIPD Variations][url=httphttp://forums.halomods.com/viewtopic.php?search_id=442547533&t=67770][Alumina BETA][/url]
fuzzman





Posts: 67
Joined: Sun Jul 30, 2006 1:52 pm
Location: the sunshine state

Post by fuzzman »

well the thing is ive tried that and i get the same results, which is the game freezing when i kill the last squad member =/
User avatar
Shadowz_O_Death




Connoisseur

Posts: 188
Joined: Wed Nov 01, 2006 8:38 am
Location: Pittsburgh, PA Xlink: Shadowz_O_Death

Post by Shadowz_O_Death »

AFuzySquirrel wrote:
Shadowz_O_Death wrote:
fuzzman wrote:im using the following script to respawn my first squad, "flood_elites"

Code: Select all

(script continuous Respawn_AI 
  (begin 
   (sleep_until (<= (ai_living_count flood_elites) 0)) 
   (sleep (* 5 30)) 
   (ai_place flood_elites)
  )
)
Everything seems to be good. Sorry man, I don't know what to tell you. Give me the mod and I'll take a look at it.

Regards,

Shadowz_O_Death
see were it says "Respawn_AI" replace that with your squad name :wink:
No, that's simply the name of the script. It doesn't matter what that is, as long as there are no spaces.

Regards,
Shadowz_O_Death
Last edited by Shadowz_O_Death on Fri Sep 21, 2007 4:28 pm, edited 1 time in total.
L0d3x




Articulatist 250

Posts: 454
Joined: Sat Aug 18, 2007 3:32 am

Post by L0d3x »

A while ago I had the same problem. I solved it as follows:

What to do if H2C gives decompilation errors and you want to use shadowz script injection tut:
I think I may have found the solution to our problem, that is to say, a work around. I have yet to test the map tomorrow morning but I definitely got the scripts into my map: here's how!

1) First simply ignore the error and get a decompiled version of the map you want to add scripts to. After this open the scenario in guerilla and add any scripts you like, assuming you enter valid AI Squad names everything should compile even though H2 Core did not decompile correctly (it did decompile the AI by me).

2) Next make a copy of your modded map. Now rebuild this copy using the scenario you just edited. The rebuilt map will be smaller in size but it should have all the scripts in it.

3) Now I had to mess around a bit but I'll tell you exactly what I did. Open up entity. Next open up your modded map, after this open up the map you just rebuilt (the one with the scripts). Now overwrite the Script data chunck from your modded map with the Script data from your rebuilt map.
After this add the Scripts chunck. Close Entity now.

4) Okay now open up Script Tools (you can find this by utilities) and open up your rebuilt map. You should see all your scripts now. Right click somewhere on the white space and select 'decompile all' and save this as a txt file somewhere. Now close this map and open up your modded map.
Right click somewhere and select 'Compile all' and you should now select the txt file you just saved. This should import your scripts correctly.

5) Now just resign your map somehow, FTP and play!

Note: Step 4 was necesarry for the following reason: when doing step 3 entity gave me some weird error and when I looked in script tools my scripts had not transferred correctly. Doing step 4 will get your scripts correctly.

Note2: I have not been able to test step 5 but I asume this should work.
I will update again tomorrow morning (morning in belgium time that is).

EDIT: YES it does work!!!
Hope this works for you too
User avatar
AFuzySquirrel




Wordewatician 250

Posts: 362
Joined: Fri Jun 22, 2007 9:04 pm

Post by AFuzySquirrel »

but it has to be the script..

it basically says when all AI are dead then to respawn.. but as soon as he makes the AI count 0 the map freezes. i would say it has to do with a bad script inject or the AI Squads relexive.
Image
[Setting BIPD Variations][url=httphttp://forums.halomods.com/viewtopic.php?search_id=442547533&t=67770][Alumina BETA][/url]
Post Reply