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 »Script Help

Author Topic: Script Help (6 messages, Page 1 of 1)
Moderators: Dennis

Horeb
Joined: Nov 27, 2013

bananakid


Posted: Jan 14, 2014 03:35 PM    Msg. 1 of 6       
in last hours I have been working with a script for camouflage hablity and it works but I have some doubts what I want to do like halo: reach so that when I move it off momentarily as when firing a weapon anyone has any idea how to do that ?

here is the video.
http://www.youtube.com/watch?v=puTZjoPdDWw


AlekosGR
Joined: Aug 13, 2013

ACE Moding Team (Azura Computer Entertainment)


Posted: Jan 14, 2014 03:53 PM    Msg. 2 of 6       
I think I saw the exact same video on facebook... Is that yours?


Horeb
Joined: Nov 27, 2013

bananakid


Posted: Jan 15, 2014 12:15 PM    Msg. 3 of 6       
Quote: --- Original message by: AlekosGR
I think I saw the exact same video on facebook... Is that yours?



yes-


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jan 15, 2014 01:18 PM    Msg. 4 of 6       
I did this awhile back. The way i went about it was by activating active camouflage with the command so it would last forever, then have a damage effect attached in the players biped tag that was only active when flashlight was off. And check the boxes "only hurts shields" and "skips shields" so that it won't do damage, and your shields can recharge. But make sure it has an active camouflage ping so that it can turn it off. Then run this script.

(global short time0 10)
(global boolean dead0 1)

(script continuous camouflage
(begin
(sleep_until (not (unit_get_health (unit (list_get (players) 0)) 0))
(set dead0 0))
(begin
(sleep_until (unit_get_health (unit (list_get (players) 0)) 0)
(set dead0 1))
(begin
(sleep_until (= dead0 1))
(sleep_until (= dead0 0))
(set cheat_active_camouflage))
(begin
(sleep_until (unit_get_current_flashlight_state (unit (list_get (players) 0))) 1)
(set time0 (- time0 1))
(sleep 30))
(begin
(sleep_until (= time0 0))
(unit_set_desired_flashlight_state (unit (list_get (players) 0)) 0))
(begin
(sleep_until (and (unit_get_current_flashlight_state (unit (list_get (players) 0))) 0) (< time0 10))
(set time0 (+ time0 1))
(sleep 30))
)

So basically what this script does, all wrapped up, is
1:waits for you to spawn and activates active camouflage via script.(the damage effect makes sure it's not visible unless your flashlight is off)
2:every time you die reactivates it so you can still use it.
3:times your flashlight to make sure you can't use it for more then 10 seconds.
4:after time runs out it turns off your flashlight.
5:once your flashlight is off it adds the time back that you've used.(only the time that you've used, so you can;t have it off for 5 minutes and then have it on for 5 minutes. 10 seconds is the maximum time it will allow you)

Notes:
Only set up for one player, making it perfect for single player. Untested for multiplayer, i could easily adapt the script for it, but i don't know if it will sync.

If you have it on for 5 seconds and turn it off, every second you have it off will be added up to 10 seconds. So if you have it on for 5 and then off for 3 you'll have 8 seconds to use. But if you leave it off for longer it will only ever get up to 10 seconds.

If you want the time to last longer just go the the part where it says "(global short time0 10)" and the part where is says "(sleep_until (and (unit_get_current_flashlight_state (unit (list_get (players) 0))) 0) (< time0 10))" and change the 10s to however many seconds you want.

so yeah, that's pretty much it. Create a new attachment in the biped tag, create your damage effect and attach it, make sure it's set up so that it's only active when flashlight is off and run this script, and all should be good. have fun.


Horeb
Joined: Nov 27, 2013

bananakid


Posted: Jan 15, 2014 01:55 PM    Msg. 5 of 6       
Thank you.


grunt_eater
Joined: Jan 26, 2011

Everything except biped rigging.


Posted: Jan 16, 2014 07:10 PM    Msg. 6 of 6       
Certainly. If you run into any snags, feel free to ask and i'll see how i can help.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 11:45 AM 172 ms.
A Halo Maps Website