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 »Questions about many things.

Author Topic: Questions about many things. (8 messages, Page 1 of 1)
Moderators: Dennis

Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Feb 23, 2011 10:53 PM    Msg. 1 of 8       
-Questions answered-
Edited by pepzee on Feb 24, 2011 at 01:18 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 23, 2011 11:21 PM    Msg. 2 of 8       
1) Yes
2) Yes
3) You can change many things through the globals.globals. The basic HUD is stored here (excluding unit_hud_interfaces, weapon_hud_interfaces), the grenades the player uses, the default player biped, and the 6 vehicles allowed in a multiplayer map, to say the least.
4) Yes
5 - 6) It's possible to combine multiple scripts into one .hsc file

What's the error when you attempt to use them together?


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Feb 23, 2011 11:33 PM    Msg. 3 of 8       
The strange thing is that there is no error. It compiles fine, but in game, the cut-scene doesn't work. You are just looking out of the eyes of the character during the cut-scene, unable to move.

I did check my debug.txt too and there was nothing in there.

I just noticed something about the script. They both have the command: (camera_control 0), once in each script. Would that have any thing to do with it?
Edited by pepzee on Feb 23, 2011 at 11:36 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 24, 2011 12:20 AM    Msg. 4 of 8       
Yes. Your second continuous script forces camera_control 0 every 1/6th of a second. I'm assuming this was in to prevent the player from using the debug camera. You could use a if statement that allows you to disable the camera_control 0 script whenever your cutscene is running. Example:

(global boolean isCutscene false)

(script startup scriptname
(sleep_until (volume_test_objects triggername (players)) 15)
(set isCutscene true)
(camera_control 1)
(camera_set cut1 100)
(sleep 50)
(camera_set cut2 100)
(sleep 50)
(camera_set cut3 100)
(sleep 100)
(camera_control 0)
(set isCutscene false)
)

(script continuous nocheatingSP
(sleep 5)
(if (= cheat_deathless_player 1) (begin (set cheat_deathless_player 0) (game_lost)))
(if (= cheat_infinite_ammo 1) (begin (set cheat_infinite_ammo 0) (game_lost)))
(if (= cheat_bottomless_clip 1) (begin (set cheat_bottomless_clip 0) (game_lost)))
(if (= rasterizer_wireframe 1) (begin (set rasterizer_wireframe 0) (game_lost)))
(if (= cheat_super_jump 1) (begin (set cheat_super_jump 0) (game_lost)))
(if (= cheat_medusa 1) (begin (set cheat_medusa 0) (game_lost)))
(if (= cheat_jetpack 1) (begin (set cheat_jetpack 0) (game_lost)))
(if (= cheat_omnipotent 1) (begin (set cheat_omnipotent 0) (game_lost)))
(if (= cheat_bump_possession 1) (begin (set cheat_bump_possession 0) (game_lost)))
)

(script continuous noCam
(if
(= isCutscene false)
(begin
(camera_control 0)
(sleep 5)
)
)
)
Edited by Gamma927 on Feb 24, 2011 at 12:20 AM


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Feb 24, 2011 11:43 AM    Msg. 5 of 8       
Does this mean that I have to use that script for every cut-scene I make?

Also the cut-scenes don't work when there are two of them together, Like:
============================================================
(script startup scriptname
(sleep_until (volume_test_objects triggername (players)) 15)
(camera_control 1)
(camera_set cut1 100)
(sleep 50)
(camera_set cut2 100)
(sleep 50)
(camera_set cut3 100)
(sleep 100)
(camera_control 0))

(script startup scriptname2
(sleep_until (volume_test_objects triggername2 (players)) 15)
(camera_control 1)
(camera_set cut4 100)
(sleep 50)
(camera_set cut5 100)
(sleep 50)
(camera_set cut6 100)
(sleep 100)
(camera_control 0))
============================================================
I don't know what I did wrong there, the cut-scenes just don't work, and there is no error. I don't get it. Thanks.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 24, 2011 01:02 PM    Msg. 6 of 8       
To reduce confusion, tell us WHY it doesn't work next time. For now, I'll assume it's the same problem as before. Do you still have the continuous script?

To use the prior script for a second cutscene, all you have to do is add in the (set isCutscene true) before starting a cutscene, and use (set isCutscene false) after a cutscene concludes. You still need to use the modified anti-cheat script, however.


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Feb 24, 2011 01:17 PM    Msg. 7 of 8       
So I do:
(global boolean isCutscene false)

(script startup scriptname2
(sleep_until (volume_test_objects triggername2 (players)) 15)
(set isCutscene true)
(camera_control 1)
(camera_set cut4 100)
(sleep 50)
(camera_set cut5 100)
(sleep 50)
(camera_set cut6100)
(sleep 100)
(camera_control 0)
(set isCutscene false)
)

But do I have to include the modified version of the nocheatingSP list to? And never mind about those two cut-scene scripts I think I get what you said. This is what my whole script looks like so far:

(global boolean isCutscene false)

(script startup scriptname
(sleep_until (volume_test_objects triggername (players)) 15)
(set isCutscene true)
(camera_control 1)
(camera_set cut1 100)
(sleep 50)
(camera_set cut2 100)
(sleep 50)
(camera_set cut3 100)
(sleep 100)
(camera_control 0)
(set isCutscene false)
)

(script continuous nocheatingSP
(sleep 5)
(if (= cheat_deathless_player 1) (begin (set cheat_deathless_player 0) (game_lost)))
(if (= cheat_infinite_ammo 1) (begin (set cheat_infinite_ammo 0) (game_lost)))
(if (= cheat_bottomless_clip 1) (begin (set cheat_bottomless_clip 0) (game_lost)))
(if (= rasterizer_wireframe 1) (begin (set rasterizer_wireframe 0) (game_lost)))
(if (= cheat_super_jump 1) (begin (set cheat_super_jump 0) (game_lost)))
(if (= cheat_medusa 1) (begin (set cheat_medusa 0) (game_lost)))
(if (= cheat_jetpack 1) (begin (set cheat_jetpack 0) (game_lost)))
(if (= cheat_omnipotent 1) (begin (set cheat_omnipotent 0) (game_lost)))
(if (= cheat_bump_possession 1) (begin (set cheat_bump_possession 0) (game_lost)))
)

(script continuous noCam
(if
(= isCutscene false)
(begin
(camera_control 0)
(sleep 5)
)
)
)

(global boolean isCutscene false)<---This is the new cut-scene starting that doesn't work.

(script startup scriptname2
(sleep_until (volume_test_objects triggername2 (players)) 15)
(set isCutscene true)
(camera_control 1)
(camera_set cut4 100)
(sleep 50)
(camera_set cut5 100)
(sleep 50)
(camera_set cut6 100)
(sleep 100)
(camera_control 0)
(set isCutscene false)
)

Sorry if this is still confusing, I'm trying my best to make it has clear as possible. Thanks.
Edited by pepzee on Feb 24, 2011 at 01:18 PM
Edited by pepzee on Feb 24, 2011 at 01:21 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Feb 24, 2011 02:42 PM    Msg. 8 of 8       
Let me explain what I did. I created a new boolean called isCutscene. When the boolean is false, signifying that a cutscene is not running, the continuous noCam script runs, preventing the player from using debug_camera_save. When a cutscene is running, isCutscene is set to true. When this is true, then the noCam script cannot execute, because isCutscene is not false. In the future, whenever you have a cutscene running, set the isCutscene boolean to true and disable it when the cutscene is done.

Now, I'll explain the two parts of what I wrote. The first part,
(global boolean isCutscene false)
initializes the variable as false. Without this line, the boolean DOES NOT EXIST. This is essentially a declaration clause. If you have no computer science or programming knowledge, envision this script as a light switch. The declaration creates the light switch, and sets the light switch to initially off. Whenever you have a cutscene, you flip the switch, or set isCutscene true. This is the second part of the script:
(set isCutscene true)
When this line is read, the aforementioned light switch is flipped on. When the cutscene is done, the light switch is flipped off,
(set isCutscene false)

Now, for your problem. You initialized isCutscene twice. To put it this way, you tried to create a new light switch where there is already one. In the physics of this universe, there is no way to have two light switches in the same place at the same time. Therefore, the compiler will spit this back out, printing out an error proclaiming that the boolean already exists.

 

 
Previous Older Thread    Next newer Thread







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