[Resources] Script Library
-
- Posts: 935
- Joined: Sat Feb 25, 2006 4:23 am
- Location: Europe. as in i'm speaking broken english coz i'm polish :D
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
Visit headshotmasta his new site! (Click burning insolence)
Mainmenu mod-=-Spacestation Deck-=-Conduit-=-Waterworld-=-South Side
Visit headshotmasta his new site! (Click burning insolence)
-
- Posts: 2154
- Joined: Sat Nov 26, 2005 7:17 pm
- Location: In a cave smokin up with tupac and big foot.
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.
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.
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 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.
-
- Posts: 98
- Joined: Tue Feb 21, 2006 7:39 pm
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.
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.
-
- Posts: 2154
- Joined: Sat Nov 26, 2005 7:17 pm
- Location: In a cave smokin up with tupac and big foot.
- Trulife8342
- Posts: 2403
- Joined: Sat Sep 03, 2005 7:04 am
- Location: Miami, FL -- Name: Mauro Garcia
- Contact:
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
But yes to keep with this current flow of conversation, he is great at scripting from what I can see.
Hence why I have no knowledge
But yes to keep with this current flow of conversation, he is great at scripting from what I can see.
Scotty Make me lawl.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
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 .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
But yes to keep with this current flow of conversation, he is great at scripting from what I can see.
-
- Posts: 98
- Joined: Tue Feb 21, 2006 7:39 pm
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.
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.
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:
Sorry, I've been hitting Charles Dickens rather hard lately.
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?
http://files.halomods.com/viewtopic.php?t=50904
my first tutorial in the tutorial section
my first tutorial in the tutorial section
-
- Posts: 98
- Joined: Tue Feb 21, 2006 7:39 pm
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: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?
Code: Select all
(script startup example
(begin
(sleep_until (= (device_group_get <device_group>) 1))
(your script here)
)
)
-
- Posts: 98
- Joined: Tue Feb 21, 2006 7:39 pm
Something along the lines of:
Would wait until he's died and then come to life again, a la respawn.
Code: Select all
(sleep_until (<= (object_get_health (player0)) 0))
(sleep_until (> (object_get_health (player0)) 0))
The command "map_reset" would probably work better, and probably be SLC.Hawaiian Modder wrote:Code: Select all
(script continuous Game_Restart (begin (sleep 500) (game_revert) ) )
Last edited by Agent ME on Mon Nov 06, 2006 9:29 pm, edited 1 time in total.
-
- Posts: 98
- Joined: Tue Feb 21, 2006 7:39 pm