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 Technical / Map Design »Active Camo Through a Script?

Page 2 of 2 Go to page: · 1 · [2] · Prev
Author Topic: Active Camo Through a Script? (48 messages, Page 2 of 2)
Moderators: Dennis

Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Dec 24, 2010 01:02 PM    Msg. 36 of 48       
Oh, I see. So it spawns the object on top of you. So what I think I will do with this is use it for health packs instead. That way it is sort of like recharging health. However if your already at full health, would it still spawn the health pack?

Also, can I use the flashlight key for more than one object? For instance, lets say I want the player to go invisible and get a health pack.

If not, can I use other keys to do this, other than the flashlight key I mean. Like the "x" key.


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 24, 2010 01:18 PM    Msg. 37 of 48       
For health restore, just use (unit_set_current_vitality (unit (list_get (players) 0)) 1).
I'm pretty sure you can leave out the shield value, but if not, add another number after the 1 for shield value

And yes, you can do as many things you want upon flashlight activation. Just attach and detach multiple objects.

Also, you can do the other-key thing for action, jump, and zoom buttons.
Edited by MoooseGuy on Dec 24, 2010 at 01:20 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Dec 24, 2010 01:42 PM    Msg. 38 of 48       
Quote: --- Original message by: pepzee
Oh, I see. So it spawns the object on top of you. So what I think I will do with this is use it for health packs instead. That way it is sort of like recharging health. However if your already at full health, would it still spawn the health pack?

Also, can I use the flashlight key for more than one object? For instance, lets say I want the player to go invisible and get a health pack.

If not, can I use other keys to do this, other than the flashlight key I mean. Like the "x" key.

You can make it spawn both a health pack and active camouflage. The script, however, does not distinguish between full health and not-so-full health. If that's what you want, you'll have to add a conditional phrase before the spawning of the equipment(s).

And yes, it is possible to make other keys spawn equipment. However, there is a limitation: You can only use keys already tabbed for other purposes (zooming, throwing grenades, etc).


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 24, 2010 01:44 PM    Msg. 39 of 48       
Lol, you basically restated what I said.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Dec 24, 2010 09:22 PM    Msg. 40 of 48       
I know. I can read :P


Skidrow925
Joined: Mar 19, 2010

"ideological sense of respect and tact of a 5yo"


Posted: Dec 24, 2010 09:58 PM    Msg. 41 of 48       
Gamma made it sound better.


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 24, 2010 11:32 PM    Msg. 42 of 48       
Meh


Skidrow925
Joined: Mar 19, 2010

"ideological sense of respect and tact of a 5yo"


Posted: Dec 24, 2010 11:49 PM    Msg. 43 of 48       
Quote: --- Original message by: MoooseGuy
Meh


I AM NOT HERE TO BE Meh'D AT! LEAVE ME ALONE!!!!


p.s. sorry I just couldn't resist.


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Dec 25, 2010 12:31 PM    Msg. 44 of 48       
Quote: --- Original message by: Gamma927
Quote: --- Original message by: pepzee
Oh, I see. So it spawns the object on top of you. So what I think I will do with this is use it for health packs instead. That way it is sort of like recharging health. However if your already at full health, would it still spawn the health pack?

Also, can I use the flashlight key for more than one object? For instance, lets say I want the player to go invisible and get a health pack.

If not, can I use other keys to do this, other than the flashlight key I mean. Like the "x" key.

You can make it spawn both a health pack and active camouflage. The script, however, does not distinguish between full health and not-so-full health. If that's what you want, you'll have to add a conditional phrase before the spawning of the equipment(s).

And yes, it is possible to make other keys spawn equipment. However, there is a limitation: You can only use keys already tabbed for other purposes (zooming, throwing grenades, etc).

I feel stupid for asking this,

What's a conditional phrase?


SlappyThePirate
Joined: Aug 24, 2009

You are irritating, I'll release nothing


Posted: Dec 25, 2010 01:15 PM    Msg. 45 of 48       
If this is true...


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Dec 26, 2010 09:53 AM    Msg. 46 of 48       
A conditional phrase is an "if, then" statement. It is used widely in many types of code languages. In Halo script, it looks like this:

(if (= condition true/false)
(begin
(command)
(command)
)
)


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Dec 26, 2010 04:57 PM    Msg. 47 of 48       
A conditional phrase is NOT an "if, then" statement :P

Rather, it's a condition that the "if, then" statement USES.

But the rest of your explanation is correct :P


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Dec 27, 2010 12:41 PM    Msg. 48 of 48       

(script continuous Cloak
(if (= condition true/false)
(begin
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true))
(object_create health)
(objects_attach (unit (list_get (players) 0)) "" health "")
(objects_detach (unit (list_get (players) 0)) health)
(sleep 1000)
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) false))
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true))
(object_create health)
(objects_attach (unit (list_get (players) 0)) "" health "")
(objects_detach (unit (list_get (players) 0)) health)
(sleep 1000)
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) false))
)

^So would it look something like this? I think rechargeable health would be a lot more helpful for what I'm doing than camouflage.

However I'm still sort of confused on that conditional script stuff. What good is that kind of script for?

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

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 10:23 AM 156 ms.
A Halo Maps Website