A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »need a script?

Page 1 of 2 Go to page: · [1] · 2 · Next
Author Topic: need a script? (48 messages, Page 1 of 2)
Moderators: Dennis

grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 7, 2011 07:18 PM    Msg. 1 of 48       
okay, So, since i have no idea how to script, despite the tutorials i have that clearly explain it (i am still learning but don't have much time) I am making a new thread because i cant seem to find any others, So i am making a new thread for scripts only, this thread is designed for people like me who need scripts, and hopefully some of the halo scripters will take pity on us and help out,


so if you need a script, Post here and hopefully it will get answered, my first request. is for a script that plays a certain effect when you crouch. and stops when you let off, the effect i want for the script is the flamethrower fire effect, i will change it out for the one i want to be used, but i think that the flamethrower firing effect will tell me how to make it locate my effect, So if any scripters can help please do, And leave the, bad attitudes\rude comments\flaming\trolling ect. at the door,

~G-E


milkkookie
Joined: Aug 10, 2010

:)


Posted: Mar 7, 2011 07:27 PM    Msg. 2 of 48       
nvm
Edited by milkkookie on Mar 7, 2011 at 07:27 PM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Mar 7, 2011 09:45 PM    Msg. 3 of 48       
Quote: --- Original message by: grunt_eater
a script that plays a certain effect when you crouch.

There isn't any script commands to monitor crouching (there are ones to make AI crouch, but none to see if they are, etc) and biped tags don't include a function block to monitor crouch either. your only option is to instead make the player a vehicle (yes, it works, and its fun having enemy AI hop in you and try and attack you with yourself), and use its function block (While biped and vehicle share many parts of their tagging system, the crouch check is under the $$$vehicle$$$ category of functions, so it doesn't show up in bipeds)


The main reason the flashlight is so overused in scripts is because it is really the only thing that can be monitored in a per-player basis. The action tests for stuff like zoom and jump, are if any player has pressed them, and leaves themselves in a true state until an action test reset occurs. So if its an SP map, you could use zoom instead, but crouch isn't even an option (which I think is a bit strange considering they included jump)


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 7, 2011 10:41 PM    Msg. 4 of 48       
hmm, well that sucks, maybe the reason that it doesn't work with crouch is because it's only an animation?, wish it would work. now i've got to find another way of doing this, because i don't like vehicles, as you can see with the last time i was looking for something like this

WAIT, i've been struck with an idea, Would it be possible to make the grenade switch button "G", switch to a third option?, And make it so when you hold right click after selecting said option. it plays a different animation than the third person throw animation, and sets off said effect?

Again, keep in mind i don't know scripting and these are simply ideas or. "concepts"
Edited by grunt_eater on Mar 8, 2011 at 12:47 AM


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Mar 8, 2011 10:10 AM    Msg. 5 of 48       
Quote: --- Original message by: grunt_eater
WAIT, i've been struck with an idea, Would it be possible to make the grenade switch button "G", switch to a third option?, And make it so when you hold right click after selecting said option. it plays a different animation than the third person throw animation, and sets off said effect?
Edited by grunt_eater on Mar 8, 2011 at 12:47 AM


Don't make it too complicated kid. The engine is quite old. That third grenade thing may be possible but you have to fake it. Remove all grenades and prevent grenade throwing for every single weapon.Then, make 3 effects that will spawn spawn and launch your grenades called grenade1, grenade2 and grenade3. Set a marker on your biped(assuming that the biped is called cyborg) called grenadel. The grenades will spawn here. Finally compile this script into your map. With this setup, you can use your action key(E by default) to switch grenades and fire them using right trigger.


(global short grenade 1)
(global short usage 6)




(script continuous grenadechange
(player_action_test_reset)
(sleep_until (player_action_test_action))
(if (= grenade 3)
(set grenade 1)
(set grenade (+ grenade 1))
)
)


(script continuous firegrenade
(sleep until (> usage 0))
(player_action_test_reset)
(if (player_action_test_grenade_trigger)
(begin
(if (= grenade 1)
(effect_new_on_object_marker grenade1 cyborg grenadel)
)
(if (= grenade 2)
(effect_new_on_object_marker grenade2 cyborg grenadel)
)
(if (= grenade 3)
(effect_new_on_object_marker grenade3 cyborg grenadel)
)
)
)
(set usage(- usage 1))
)


(script continuous usageup
(sleep (* 30 10))
(set usage (+ usage 1))
(if usage (> usage 6)
(set usage 6)
)
)


If you are serious about learning how to script, download this tutorial
http://hce.halomaps.org/index.cfm?fid=5531
download this reference to all of the dev commands.
http://hce.halomaps.org/index.cfm?fid=1738
and study the scripts given in this thread. That's basically how I study. Know your foundation, keep a reference and experiment.
-Zekilk
Edited by cyboryxmen on Mar 9, 2011 at 05:59 AM


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 11:31 AM    Msg. 6 of 48       
I already had the first one and 2 or 3 others, but the second one is new, Thank you for equipping me with what i need, so by studying this script this is what i think the sections mean,


(global short grenade 0) this one, Not so sure about
(global short usage 6)
i would say this one makes it so each option can be used twice. Simply by the amount of numbers

script continuous grenadechange continuous
means that the script can be repeated over and over until it is told otherwise
(player_action_test_reset) if the player presses the action key?
(sleep_until (player_action_test_grenade_trigger)) is not triggered by anything but the player hitting the action key 'E'
(if (= grenade 3) if you get to the third option
(set grenade 0) you have no grenades?
(set grenade (+ grenade 1)) not sure about?


(script continuous firegrenade
you can throw grenades continuously?
(sleep until (and (> usage 0) (> grenade 0))) i have no clue?
(player_action_test_reset) it resets after a certain amount of time?
(if (player_action_test_action) if said thing happens
(begin
(if (= grenade 1)
(effect_new_on_object_marker grenade1 grenadel)
if you select grenade 1it plays the effect of the frag?
)
(if (= grenade 2)
(effect_new_on_object_marker grenade2 grenadel)
same thinbg with the plasma
)
(if (= grenade 3)
(effect_new_on_object_marker grenade3 grenadel)
it plays the effect i want it to

(set usage(- usage 1)) you get one grenade and you have to wait for it to reset
)

(script continuous usageup
i think thats obvious
(sleep (* 30 15)) i would say this is the amount of time you must wait, though im not sure why two numbers are here?
(set usage (+ usage 1)) if you use it then it count as 1 to the amount of times you are aloud to use the effect
(if usage (> usage 6)
(set usage 6)
you may use it 6 times and then you have the cool down?
Edited by grunt_eater on Mar 8, 2011 at 11:34 AM


gruntpowered
Joined: Feb 14, 2011

Halo CE annivarsary mod WIP


Posted: Mar 8, 2011 11:37 AM    Msg. 7 of 48       
Why dont you guys think of a script to make a sprint function. Ive done it before with using the backward button but then i cant walk backward and it does not look like im sprinting(no sprint animation) But mabey i could use flashlite and have it in a well lit area.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 11:44 AM    Msg. 8 of 48       
i am working on sprint that requires no scripting, and i think it'll be quite successful


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Mar 8, 2011 01:52 PM    Msg. 9 of 48       
Quote: --- Original message by: grunt_eater

I already had the first one and 2 or 3 others, but the second one is new, Thank you for equipping me with what i need, so by studying this script this is what i think the sections mean,


(global short grenade 0) this one, Not so sure about
(global short usage 6)
i would say this one makes it so each option can be used twice. Simply by the amount of numbers

script continuous grenadechange continuous
means that the script can be repeated over and over until it is told otherwise
(player_action_test_reset) if the player presses the action key?
(sleep_until (player_action_test_grenade_trigger)) is not triggered by anything but the player hitting the action key 'E'
(if (= grenade 3) if you get to the third option
(set grenade 0) you have no grenades?
(set grenade (+ grenade 1)) not sure about?


(script continuous firegrenade
you can throw grenades continuously?
(sleep until (and (> usage 0) (> grenade 0))) i have no clue?
(player_action_test_reset) it resets after a certain amount of time?
(if (player_action_test_action) if said thing happens
(begin
(if (= grenade 1)
(effect_new_on_object_marker grenade1 grenadel)
if you select grenade 1it plays the effect of the frag?
)
(if (= grenade 2)
(effect_new_on_object_marker grenade2 grenadel)
same thinbg with the plasma
)
(if (= grenade 3)
(effect_new_on_object_marker grenade3 grenadel)
it plays the effect i want it to

(set usage(- usage 1)) you get one grenade and you have to wait for it to reset
)

(script continuous usageup
i think thats obvious
(sleep (* 30 15)) i would say this is the amount of time you must wait, though im not sure why two numbers are here?
(set usage (+ usage 1)) if you use it then it count as 1 to the amount of times you are aloud to use the effect
(if usage (> usage 6)
(set usage 6)
you may use it 6 times and then you have the cool down?
Edited by grunt_eater on Mar 8, 2011 at 11:34 AM

First two things are global defined variables (can be accessed from any other script, or even devmode) there information type is short (numbers) the name then they have the names they are accessed from, and their default starting value (you can set any number)

all scripts start with the word script (to tell the game the differance between globals and scripts) then the type of script (continuous, startup, dormant, static (static gets an extra option which defines the type of static. you can live without statics since they are essentially shortcuts)) and then the script name

player_action_test are just checks if people press certain buttons. a reset simply sets the fact they have been pressed to false. If you press jump, the player_action_test_jump stays true until a reset happens, etc.

sleep_until will pause until it finds the condition spesified true. So, since the action tests where all set to false previously, it will wait until any player presses grenade throw button again, then continue the script.

the syntax for if, is (if ), meaning that if it finds the first thing true, then preform the action listed right after the true/false. if it isnt true, preform the the other action. (if you want an if to preform more than one action per result, you use a begin).

So, if the global variable, grenade is 3, then it sets the same variable to 0. if its not, it preforms a math operation between grenades current number, and adds one to it, and then stores that new number in the original grenade variable.

end of first script, the game now returns to the top of itself, preforming the reset again, and waits for the grenade trigger, etc.


another continuous script.
waits until both usage, and grenade are larger than 0 (again, math stuff)
resets all action tests.
if any player presses action key (enter vehicle, pick up gun, etc (ya, this script kinda makes you throw grenades if your trying to change guns lol. he did leave 0 as no grenades though, but thats still gonna be anoying))

begin - makes all commands in its ( ) act as one command (so that you can have it act as a single result of an if)

if the global variable is 1, create an effect directly in your tags folder called grenade1, on an object in your name labeled grenadel, with an unspesified marker (really should be the player instead, and come from his hand marker.. but what ever)

if the global variable is 2, effect grenade2 from same place as above

if global variable is 3, effect grenade3 from same place as above

uses math to set a variable that is being used as an ammo limit to one lower than it currently is (I find it a bit strange that you have one ammo limit shared for all 3 grenade types, but whatever)

end of script, its continuous so return to top of script.

continuous, you should know this by now, blah blah

sleep makes it wait for a spesified number of time (30 is about equal to one second) then there is more math because hes to lazy to multiply 15*30 himself, so hes instead making your computer do it every single time wasting that tiny bit of cpu *shrugs*

after that delay, gives you ammo for no aparent reason. (math, blah blah)

if usage is higher than 6, set it back to 6 (idk why he didnt just toss the if in the previous statement so that it only gave you ammo if you had less than 6, but whatever)

end of script, go to top of script.




Anyways, if you are serious about understanding scripts, open sapien, hit ~ then type script_doc and hit enter. in your halo ce folder, there should now be a text file called hs_doc. its all you'll ever need.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 02:11 PM    Msg. 10 of 48       
i am so surprised that i actual understand what you guys are saying, One question though. how do i open a .doc file?


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 8, 2011 07:10 PM    Msg. 11 of 48       
Quote: --- Original message by: grunt_eater
how do i open a .doc file?
...

*facepalm*

That has GOT to be the biggest fail I have EVER seen during my time on HaloMaps.

Okay, before I randomly rage more at that idiotic comment, let me get some things straight.

A: You run Windows as an Operating System.

B: You know what Microsoft Office is (hopefully).

C: Yet you have no CLUE as to what a .doc file is?













It's called Microsoft Word (Word Viewer if you don't have MS Office) for a reason, kid.

/rage


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 08:33 PM    Msg. 12 of 48       
A:yes
B: true
C:Not in the least, I haven't heard of it until this thread, Sorry for not digging into every corner of my O.S

Okay, i didn't know if it was an executeable file. Or an informational file that could be accessed by wordpab
Edited by grunt_eater on Mar 8, 2011 at 08:36 PM


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Mar 8, 2011 08:39 PM    Msg. 13 of 48       
A .doc file stands for document. You can open it in Word.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 08:45 PM    Msg. 14 of 48       
Then WHY didn't you just say that?, i know what a document is, duh -_-


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 8, 2011 08:57 PM    Msg. 15 of 48       
.txt, .doc, .docx and other text/document files can be opened by Microsoft Word - which is installable through Microsoft Office. And yes, Google is everyone's friend.

Either that, or you'll have Microsoft Word Viewer in place of it. Word Viewer only accesses the read-me part of the .doc or whatever file, it doesn't have the capacity to edit said files. Only MS Word can fully open, view and edit text/document files.

@gold: That's why I said it was the biggest fail I've ever seen here >.>


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 09:04 PM    Msg. 16 of 48       
wow you people think im such a moron, OF COURSE I KNOW IT'S ON A COMPUTER, I DIDN'T UNDERSTAND THAT .DOC FORMAT WAS A SHORTENING OF .DOCUMENT, GEES GUYS. I'M NOT STUPID, i have wordpad and and notepad, i know wordpad can open anything, i just didn't know that doc was short for document


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 8, 2011 09:16 PM    Msg. 17 of 48       
WordPad can NOT open .doc files properly. Yes, it can open .docx, but not .doc. I know. I just tried to.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 09:28 PM    Msg. 18 of 48       
i am not being that serious, and so what if it's weird, i like weird, i can make it work right, it might not be perfect but it'll work and you'll be able to do as i wish, as for not being able to pick up weapons, you could use X?, and yes wordpad can open .doc files, I just tried it, go into wordpad click file, open, locate the place where your .doc file is, and down in the bottom right corner you'll see file type, change it to all files, and open your .doc file, woo hoo -_-


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 8, 2011 09:57 PM    Msg. 19 of 48       
I said it can't open it PROPERLY. As in, without all the random letters and spaces before the actual text. Also, WordPad doesn't carry the formatting over from MS Word. Which is why I use Word almost exclusively execpt when I'm making scripts. Then I use NotePad.


Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Mar 8, 2011 10:00 PM    Msg. 20 of 48       
Quote: --- Original message by: UBE Chief
Google is everyone's friend.

I tried to add Google as a friend, but they rejected me :(


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 8, 2011 10:02 PM    Msg. 21 of 48       
There's only one way to say this:

LOLFAIL!


XlzQwerty1
Joined: Aug 6, 2009


Posted: Mar 8, 2011 10:06 PM    Msg. 22 of 48       
Get out Troll.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 10:09 PM    Msg. 23 of 48       
ok guys so this thread has gotten off topic, i would appreciate it if it got back on ;), so there is no way to make a script check if a biped is crouching, oh well. moving on, can someone tell me how to script it so in cft the blue flag doesn't spawn, well, not "doesn't spawn", but is automatically destroyed, i'm working on a custom gametype, and that is part of it


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 8, 2011 10:25 PM    Msg. 24 of 48       
Quote: --- Original message by: XlzQwerty1
Get out Troll.
I'm not trolling, I was laughing at the "Google friend" fail. You must've mistaken me for assassinchief.

Quote: --- Original message by: grunt_eater
ok guys so this thread has gotten off topic, i would appreciate it if it got back on ;), so there is no way to make a script check if a biped is crouching, oh well. moving on, can someone tell me how to script it so in cft the blue flag doesn't spawn, well, not "doesn't spawn", but is automatically destroyed, i'm working on a custom gametype, and that is part of it
Move the flag to somewhere inaccessible in sapien and place a killbox around the area where it'll spawn. This will effectively deter anyone using hacks/dev to nab the flag and score. I did this in CnR_Infinity, and it worked so far. I'd like to see a hacker go through a killbox and survive (I doubt it's possible, not even cheat_deathless_player counteracts the killbox).

Oh, and don't forget to make the killbox an appropriate size. I'd say at least the size of a Warthog at minimum, a Scorpion at max. This gives the script (for the killbox) enough time to realize that a player is within its boundaries to kill said player.

I'll post a sample script as soon as I get on my desktop.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 8, 2011 10:41 PM    Msg. 25 of 48       
actually. i want the flag to not be there, i want the red team not to even have the nav point, and the blue team to still be able to score at there base,i know there are scripts out there to destroy an object, just not how to make them


milkkookie
Joined: Aug 10, 2010

:)


Posted: Mar 8, 2011 11:36 PM    Msg. 26 of 48       
i was gonna ask you for the script for the jetpack flashlight but u dint use any scripts did u you just change the light to a damage effect correct me if im wrong


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 9, 2011 12:13 AM    Msg. 27 of 48       
i used someones script to make it so you could only use it for a few seconds, But the rest was only a damage effect, you are correct


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Mar 9, 2011 01:41 AM    Msg. 28 of 48       
Here's another script.
This script can tell what team a player is in. This is the last script I used before I start making my own.

Quote: --- Original message by: ASP_GRUNTS

I have a script that checks the team of a player. I'll get it later, but you can make 2 global shorts named red, blue, and constantly check how many player's are on what team. It's easy.
EDIT:
(global short red_number 0)
(global short blue_number 0)

(global short player0 0)
(global short player1 0)
(global short player2 0)
(global short player3 0)
(global short player4 0)
(global short player5 0)
(global short player6 0)
(global short player7 0)
(global short player8 0)
(global short player9 0)
(global short player10 0)
(global short player11 0)
(global short player12 0)
(global short player13 0)
(global short player14 0)
(global short player15 0)
(global short player_number 0)


(script static "unit" player
(unit (list_get (players) player_number))
)

(script continuous team_number
(set red_number 0)
(set blue_number 0)
(if (= player0 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player1 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player2 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player3 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player4 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player5 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player6 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player7 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player8 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player9 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player10 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player11 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player12 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player13 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player14 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
(if (= player15 1)
(set red_number (+ red_number 1))
(set blue_number (+ blue_number 1))
)
)

(script continuous team_check
(ai_magically_see_unit blue_ai/blue_ai (player))
(if (= (ai_status blue_ai/blue_ai) 4)
(begin
(if (= player_number 0)
(set player0 1)
)
(if (= player_number 1)
(set player1 1)
)
(if (= player_number 2)
(set player2 1)
)
(if (= player_number 3)
(set player3 1)
)
(if (= player_number 4)
(set player4 1)
)
(if (= player_number 5)
(set player5 1)
)
(if (= player_number 6)
(set player6 1)
)
(if (= player_number 7)
(set player7 1)
)
(if (= player_number 8)
(set player8 1)
)
(if (= player_number 9)
(set player9 1)
)
(if (= player_number 10)
(set player10 1)
)
(if (= player_number 11)
(set player11 1)
)
(if (= player_number 12)
(set player12 1)
)
(if (= player_number 13)
(set player13 1)
)
(if (= player_number 14)
(set player14 1)
)
(if (= player_number 15)
(set player15 1)
)
)
)
(if (!= (ai_status blue_ai/blue_ai) 4)
(begin
(if (= player_number 0)
(set player0 2)
)
(if (= player_number 1)
(set player1 2)
)
(if (= player_number 2)
(set player2 2)
)
(if (= player_number 3)
(set player3 2)
)
(if (= player_number 4)
(set player4 2)
)
(if (= player_number 5)
(set player5 2)
)
(if (= player_number 6)
(set player6 2)
)
(if (= player_number 7)
(set player7 2)
)
(if (= player_number 8)
(set player8 2)
)
(if (= player_number 9)
(set player9 2)
)
(if (= player_number 10)
(set player10 2)
)
(if (= player_number 11)
(set player11 2)
)
(if (= player_number 12)
(set player12 2)
)
(if (= player_number 13)
(set player13 2)
)
(if (= player_number 14)
(set player14 2)
)
(if (= player_number 15)
(set player15 2)
)
)
)
(set player_number (+ player_number 1))
(if (= player_number 16)
(set player_number 0)
)
)

I'm not going to find the newer version, but this one will work fine.
To use this, all you need to do is create a biped that has an AI of blue team, and place it somewhere in Sapien. Set the encounter and squad(I think those are the right groups?) names to blue_ai.
Edited by ASP_GRUNTS on Dec 18, 2010 at 04:15 PM


@kirby 422:

-Zekilk
Edited by cyboryxmen on Mar 9, 2011 at 05:33 AM


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 9, 2011 02:49 AM    Msg. 29 of 48       
Quote: --- Original message by: grunt_eater
actually. i want the flag to not be there, i want the red team not to even have the nav point, Set the Gametype to force the flag to appear on radar only.

and the blue team to still be able to score at there base, Gametype = Assault

i know there are scripts out there to destroy an object, just not how to make them object_destroy flag_0 ?
Answers in red. Although I'm not sure if the last one would work or not.


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Mar 9, 2011 05:51 AM    Msg. 30 of 48       
Quote: --- Original message by: UBE Chief
Quote: --- Original message by: grunt_eater
actually. i want the flag to not be there, i want the red team not to even have the nav point, Set the Gametype to force the flag to appear on radar only.

and the blue team to still be able to score at there base, Gametype = Assault

i know there are scripts out there to destroy an object, just not how to make them object_destroy flag_0 ?
Answers in red. Although I'm not sure if the last one would work or not.


Probably not. Flags are an asset of a game variant. My guess is that you will get an exception error.

Btw, I never got to know about static scripts. Could you elaborate on it kirby cause up to now, I never fully understood ASP grunt's script because of that static script. What does it do exactly? Also, I fixed the script so that it is more organised, fixed the (effect_new_on_object_marker) thing, uses the right trigger to fire grenades this time and the usage replenishes every 10 seconds. The (* 30 10) thing still stays the same though.
-Zekilk


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 9, 2011 10:57 AM    Msg. 31 of 48       
i don't want to set a custom gametype, i want the normal ctf game type to do this, so that whoever downloads the map doesn't have to make\use a custom gametype for the maps original purpose, ok so forget the flag being destroyed, is it possible to make the score point for both teams by entering into a trigger volume, or walking over a netgame flag?


Dwood
Joined: Oct 23, 2007

Judge Ye Therefore


Posted: Mar 9, 2011 05:28 PM    Msg. 32 of 48       
Quote: --- Original message by: cyboryxmen


If you are serious about learning how to script, download this tutorial
http://hce.halomaps.org/index.cfm?fid=5531
download this reference to all of the dev commands.
http://hce.halomaps.org/index.cfm?fid=1738
and study the scripts given in this thread. That's basically how I study. Know your foundation, keep a reference and experiment.
-Zekilk
Edited by cyboryxmen on Mar 9, 2011 at 05:59 AM


It warms my heart to see others using my tutorials d'aaaaaawwwww <3


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Mar 9, 2011 08:39 PM    Msg. 33 of 48       
Quote: --- Original message by: cyboryxmen
Btw, I never got to know about static scripts. Could you elaborate on it kirby cause up to now, I never fully understood ASP grunt's script because of that static script. What does it do exactly?
-Zekilk

as I said previously, they are basically shortcuts.
(script static "unit" player
(unit (list_get (players) NUMBER))
)

anytime you toss (player) somewhere, that word will be classified as a unit (so you can place it anywhere units or objects are expected(units are sub-categorized of objects))

When the script encounters the word (player), it then automatically preforms the entire command, (unit (list_get (players) NUMBER))

Basically, if you have something long that your going to be using in the exact same way multiple times, make a static, because its just a shortcut to those commands. you can toss a billion different things in the quotes for different types. "void" is for a normal list of commands you just want to call on (like a sleep until blah, if health < blah, save game totally unsafe, etc. then you can call on that every time you need to save a checkpoint in SP instead of rewriting it each time)

If you need to know more static options, just open up guerilla in a scenario, and check where the scripts are stored, and click the return type drop box to see em all (idk what it does if you try an incapatible type with the commands you write, but im asuming it would just yell about capatibility when compiling)

Quote: --- Original message by: Juiceb0xhero
anybody got a script that spawns a random weapon?


(global boolean rawrz 0)

(script continuous weaponz
(sleep 3600)
(begin_random
(if (= rawrz 0) (begin (object_create_anew pistol1) (set rawrz 1)))
(if (= rawrz 0) (begin (object_create_anew plasmapistol1) (set rawrz 1)))
(if (= rawrz 0) (begin (object_create_anew rocketlauncher1) (set rawrz 1)))
)
(set rawrz 0)
)

waits 2 minutes, randomly chooses one of the 3 weapons (you can toss as many options there as you want) since rawrz is 0 at the time, it creates which ever weapon it picked first. then sets rawrz to 1, and the other commands all try to run, but since rawrz is 1, they do not create anything. after that, set rawrz back to 0, and back to top.

The one downside to this, is that only one of each weapon from that spawn point can exist at a time (since its creating it by object). a quick easy alternitive is to make it use an effect that spawns the item (which would be much nicer actually, since currently I have nothing in there to check if the weapon already exists and to not waste trying to create it if it does exist (since it cant, and then would set it to rawrz 1 anyways))

Oh well, you never really gave any standards you wanted for it anyways, so that is how it is (your fault, not mine).


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Mar 9, 2011 11:55 PM    Msg. 34 of 48       
Quote: --- Original message by: grunt_eater
i don't want to set a custom gametype
Assault isn't a custom gametype, lol.



Derp.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Mar 10, 2011 12:14 AM    Msg. 35 of 48       
no, but it isn't ctf either, i want all flag related games to make it work like what i posted, so red team is guarding and blue is capturing, i don't want the flag to be destroyed anymore, i have found a way around that, what i do want is for blue team to be able to score where the red flag doesn't spawn, in a trigger volume or something lol

 
Page 1 of 2 Go to page: · [1] · 2 · Next

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 9:02 PM 141 ms.
A Halo Maps Website