[Resources] Script Library

This forum is for uploading new building blocks for maps such as tags and new models. Please do not post any copyrighted material (ie, models/textures from other games).
User avatar
Geo
Forum Manager




Illusionist Stylist Advisor Pi
Connoisseur Pyre Socialist Tsunami

Posts: 4404
Joined: Sun Jun 19, 2005 1:01 am
Location: United Kingdom
Contact:

Post by Geo »

Loving the script DeToX :wink:
Image
For extremely cheap web hosting and domains, PM me. Includes excellent control panel software and instant activation!
User avatar
Munsie




Blacksmith

Posts: 1485
Joined: Mon Aug 29, 2005 11:07 am
Location: Canada

Post by Munsie »

ali954 wrote:is there a way to make a script start from the time u respawn?
So like after being alive for 2 minutes you just die? Or the longer you're alive, the better weapon you get? That'd be neat.

~Munsie
smacktalker




Trickster Commentator Wordewatician 500

Posts: 935
Joined: Sat Feb 25, 2006 4:23 am
Location: Europe. as in i'm speaking broken english coz i'm polish :D

Post by smacktalker »

can you script the masterchief to make me a peanutbutterjelly sandwich?
Halo 2 Modder&Player,XBC:Ownagemaster.
Mainmenu mod-=-Spacestation Deck-=-Conduit-=-Waterworld-=-South Side
Image
Visit headshotmasta his new site! (Click burning insolence)
Hawaiian Modder




Pi Connoisseur

Posts: 2154
Joined: Sat Nov 26, 2005 7:17 pm
Location: In a cave smokin up with tupac and big foot.

Post by Hawaiian Modder »

Can I get some help on why my script doesn't work. Or why none of my scripts work.

Here's the script in SoL's text decompiler.

Code: Select all

(script command cs_actor_respawn 
  (begin 
   (sleep_until (<= (ai_living_count ai_current_actor) 0)) 
   (sleep 600) 
   (ai_place ai_current_actor) 
   (print "Actor has respawned")
  )
)
Now it's supposed to sleep until the actor it's referenced in dies, When he dies then it sleeps for 600 fps or 20 seconds then places the actor and prints that the actor has respawned.

Now it doesn't work for me. I referenced it in the 440 block index in the starting location reflexive. I've tried squad scripts and all that and nothing has worked. Could it be my map?

Also is it possible to make a script that's command, where it sleeps until the ai's fighting count is 0, then the ai will search for the player, when it finds the player then the script ends. It's just so that my ai becomes slightly smarter.
Image
Thanks lej for the sig.
Dr.Cox wrote:I like Cox.
Soldier of Lite




Coagulator Pi Miner Wordewatician 50

Posts: 98
Joined: Tue Feb 21, 2006 7:39 pm

Post by Soldier of Lite »

The problem with that is that you're running the command script on a squad, not an actor. Just say (sleep_until (<= (ai_living_count ai_current_squad) <actorcount - 1>)), and that will respawn the one actor that died.

As for your searching script, yes it's possible. There's a script to check for ai in combat (I don't remember it offhand), and I'm sure you can do some sort of searching script. It'd be a little harder, but it's possible.
Image
Hawaiian Modder




Pi Connoisseur

Posts: 2154
Joined: Sat Nov 26, 2005 7:17 pm
Location: In a cave smokin up with tupac and big foot.

Post by Hawaiian Modder »

Wait for my script I refrenced it in each actor in every squad. Not in the squad.
Image
Thanks lej for the sig.
Dr.Cox wrote:I like Cox.
Battery





Posts: 694
Joined: Thu Jul 06, 2006 6:11 am

Post by Battery »

isnt soldier of lite just the best scripter ever...
Image
User avatar
Trulife8342




Orb Commentator Firestorm

Posts: 2403
Joined: Sat Sep 03, 2005 7:04 am
Location: Miami, FL -- Name: Mauro Garcia
Contact:

Post by Trulife8342 »

yeah he is.
User avatar
ScottyGEE




Visioneer Vector Mad Hatter Artisan
Snitch! Enthraller Pi Critic
Sorceror Droplet Scorched Earth Socialist
Advisor Articulatist 500

Posts: 7352
Joined: Sun Aug 15, 2004 9:08 pm
Location: Down under
Contact:

Post by ScottyGEE »

Notice how the people that take the time to learn things by themselves end up knowing a lot more than people who just go with the flow and wait for tutorials or apps do it for them? ;)
Hence why I have no knowledge :D

But yes to keep with this current flow of conversation, he is great at scripting from what I can see.
Image
This collaboration is not endorsed by Halomods
Technically its only me animating though ;)
-DeToX-




Illusionist Recreator Connoisseur Acolyte
Sigma Decryptor Droplet Pyre
Blacksmith Socialist New Age System Engineer
ONI

Posts: 4589
Joined: Sun Jun 18, 2006 3:58 pm
Location: ...

Post by -DeToX- »

ScottyGEE wrote:Notice how the people that take the time to learn things by themselves end up knowing a lot more than people who just go with the flow and wait for tutorials or apps do it for them? ;)
Hence why I have no knowledge :D

But yes to keep with this current flow of conversation, he is great at scripting from what I can see.
Scotty Make me lawl.
Image
Battery





Posts: 694
Joined: Thu Jul 06, 2006 6:11 am

Post by Battery »

ScottyGEE wrote:Notice how the people that take the time to learn things by themselves end up knowing a lot more than people who just go with the flow and wait for tutorials or apps do it for them? ;)
Hence why I have no knowledge :D

But yes to keep with this current flow of conversation, he is great at scripting from what I can see.
that and not going to school :P.
Image
Soldier of Lite




Coagulator Pi Miner Wordewatician 50

Posts: 98
Joined: Tue Feb 21, 2006 7:39 pm

Post by Soldier of Lite »

Thanks for the compliments. I really just had a lucky guess and an obsession when it came to scripting. I always wanted to figure out how it worked, but I never dreamed it would become something like this. If you still want to learn how I did it my technical tut is still out there. This program is designed to work effectively, to make your lives easier. It's not meant to teach you how to script. It will help you learn how by guiding you through building a script, but it will not teach you (and neither will I... I've done enough for a while at least).

Oh, and by the way... I do go to school, so I don't know what that was supposed to mean... However, my school doesn't have any good computer programming classes. I'm taking the only available one this year in visual basic 6, and I already finished the book we're supposed to be working out of.
Image
n64nerd




Articulatist 100

Posts: 127
Joined: Mon Dec 05, 2005 5:44 pm

Post by n64nerd »

I don't mean to be rude, but I am in a tight situation and I need to get an answer or at least acknowledgement that someone read my previous post. I have a deadline for friday to meet, and I would really like to get any sort of answer to my questions which, in my opinion, do present some manner of presence in the concerns of the general body of new scripters. If I may repeat myself:

Code: Select all

can you find teams? can you tell which team or which player activated a switch? can you make one team win? how would you see if a switch spawned through the machine palette was pressed?
Sorry, I've been hitting Charles Dickens rather hard lately.
http://files.halomods.com/viewtopic.php?t=50904
my first tutorial in the tutorial section
Soldier of Lite




Coagulator Pi Miner Wordewatician 50

Posts: 98
Joined: Tue Feb 21, 2006 7:39 pm

Post by Soldier of Lite »

can you find teams? can you tell which team or which player activated a switch? can you make one team win? how would you see if a switch spawned through the machine palette was pressed?
No, you cannot find teams. No, you cannot check which player activated a switch. No, you cannot make a team win. To see if a switch was pressed, first you need to assign it to a device group, then use a script to check if the device group has power:

Code: Select all

(script startup example
 (begin
  (sleep_until (= (device_group_get <device_group>) 1))
  (your script here)
 )
)
Image
Dojorkan




Coagulator Blacksmith

Posts: 1084
Joined: Sun Jan 30, 2005 7:54 am

Post by Dojorkan »

No, you cannot make a team win.
Yes you can, its called "skillz". ;)
User avatar
ali954
Readers Club





Posts: 150
Joined: Mon Oct 11, 2004 1:20 pm
Location: VA
Contact:

Post by ali954 »

i have a script that make u black out and die after a period of time. but i want it to start after each spawn so u dont respawn and die as soon as u respawn if u die be4 the time of the script.
Soldier of Lite




Coagulator Pi Miner Wordewatician 50

Posts: 98
Joined: Tue Feb 21, 2006 7:39 pm

Post by Soldier of Lite »

Something along the lines of:

Code: Select all

(sleep_until (<= (object_get_health (player0)) 0))
(sleep_until (> (object_get_health (player0)) 0))
Would wait until he's died and then come to life again, a la respawn.
Image
User avatar
ali954
Readers Club





Posts: 150
Joined: Mon Oct 11, 2004 1:20 pm
Location: VA
Contact:

Post by ali954 »

do i need to ref player0 to myself or sumthin cuz it says unknown script for player0. if so how would i do that?
User avatar
Agent ME




Articulatist 500

Posts: 881
Joined: Tue Jun 21, 2005 6:00 pm
Location: California, USA
Contact:

Post by Agent ME »

Hawaiian Modder wrote:

Code: Select all

(script continuous Game_Restart 
  (begin 
   (sleep 500) 
   (game_revert)
  )
)
The command "map_reset" would probably work better, and probably be SLC.
Last edited by Agent ME on Mon Nov 06, 2006 9:29 pm, edited 1 time in total.
Soldier of Lite




Coagulator Pi Miner Wordewatician 50

Posts: 98
Joined: Tue Feb 21, 2006 7:39 pm

Post by Soldier of Lite »

Yes, you do. You can take the player0 script from SP if you want, or you can replace any occurrence of "(player0)" with "(unit (list_get (players) 0))".
Image
Post Reply