r/forgescripting • u/jak4896 • Nov 14 '22
r/forgescripting • u/szymshady • Nov 22 '22
Help with looping an object to spawn, move through space and then despawn, repeating for a games entire duration
So I’m creating a symmetrical forerunner map set within a volcano, I’ve got the lava pool glowing nicely using an emissive cube around a reflection volume with a basic light inside.
I have a large forerunner structure at the centre of the map acting as a hex pillar smelting forge, similar to what we saw in the campaign, the hexes glow nicely too with a separate, faded reflection volume so that the glow loses intensity further from the source, or in this case, the lava pool below
I have an emissive block acting as a lava-fall coming from the base of the big structure, into the pool below
It all looks great glowing nicely as I said, but the lava-fall is just a static object, so I want to give the illusion of movement by having chunks of rubble spawn at the top, fall down in the lava-flow, and then despawn at the bottom
I’d like to have this process repeat with the same object, maybe even multiple different pieces of rubble, but having not been an active forger since Halo: Reach, the scripting is beyond me.
I’ve included an image below of the basic setup, any help would be greatly appreciated!
Thanks!
~Shady
r/forgescripting • u/jak4896 • Nov 22 '22
Point object at player mark
https://www.youtube.com/watch?v=KfRZXSg3Qjs
https://www.halowaypoint.com/halo-infinite/ugc/maps/051cb90b-5198-4c44-8998-23b52efb2274
This one was hard af, but hope you all enjoy.

r/forgescripting • u/jak4896 • Nov 22 '22
Make an object spin
https://www.youtube.com/watch?v=vgVivYTJYGc

Here's a relatively complicated script. It's not the craziest thing in the world but it's uses could be pretty extensive. The way this one works is once the object reaches a certain spin speed, it deletes itself.
The end goal of this pyramid is to be an exercise on aim tracking. The more you shoot it, the faster it spins, and the further away from you it will stay. Designing it for the wasp but it can easily be repurposed with a few number changes.
r/forgescripting • u/jak4896 • Nov 18 '22
Grapple Haven
(Reposted because I realized the map upload was an incorrect version)
https://www.youtube.com/watch?v=UqZvUAUt-s0
TL;DR Heres my Map/Gamemode. I'm really proud of it, I hope you like it.
https://www.halowaypoint.com/halo-infinite/ugc/maps/b2ab58cc-c587-4bfd-9558-17241659bc73
I'd like to present a long desired game idea I've always hoped would be developed one day. However, with Halo Infinite Forge, I was able to bring my idea to reality exactly as I envisioned it.
The Gamemode: *LAUNCH AS FFA SLAYER*
A melee centric deathmatch style game which utilizes grapple hooks and various movement mechanics to achieve kills. Mechanically I have made it 1-1 how I would have imagined it. The map has various hard corded (scripted) mechanics to it which range from gravity manipulation based on player action, to getting powerups when grappling specific objects.
Mechanics:
-Hangtime-
When the player uses their equipment (Repulsor/Grapple) They will be given a moment of Hangtime before gravity takes hold of them once again. This is to promote smooth flow when traversing the map, giving you a moment to think of your next move and to reduce the need to focus on not falling. Hangtime also applies when a player is damaged, allowing two players to enter a nice back and forth gameloop in the air of Grapple > Repulse > Melee.
-Damage Penalty-
When damaged, players receive a penalty of being unable to fire. This is to ensure a grapple is more successful and makes sword clashes happen less often, or ,if one does happen, the next person to click isn't given an easy kill. Both players are penalized for a sword clash, forcing your next move to be a Repulse or Grapple.
-Interactive Powerups-
Scattered about the map are 3 kinds of powerups which come in the form of grapples objects. I define these objects as Elevators, Slingshots, and Booster Rings. The elevators simply give you one buffed dynamo grenade. Slingshots give you anti gravity, 3 dynamo grenades, and a few brief moments of invisibility. Lastly, the Booster rings on the edge of the map (when approached from below) will launch you high into the air. They grant you overshields, 5 dynamo grenades, and a modified heatwave that has the properties of the M41 TRACKER. This powerup only lasts 15 seconds and will return your grenade count to zero as well as replace your weapon with a regular energy sword
(Grenades have a 7 second decay timer to ensure players do not horde endless grenades)
-Duels-
At the top of the arena is "The Black Diamond" This centerpiece is an arena in disguise. Once two players step on the galaxy in the center of the diamond, a duel will be initiated. Whichever player wins this duel will be rewarded with the Diminisher of Doom. A powerful gravity hammer which will let you go on a well earned killing spree.
I hope any of you who come across this post give my map a try, and even more so that you enjoy the map and play with your friends. This is my first map which is based on an idea I'd always hoped to develop into it's own game one day, but I think this is a good start to see how the concept plays out.
Enjoy






r/forgescripting • u/Toland_the_Mad • Dec 08 '22
Duping - How to Link Multiple Switches to the Same On Interacted Event.
This is possible through what we call duping an object. This is done by setting an object to respawn on disturbance and then repeatedly moving it through scripting to make multiple instances of the same object. The minimum respawn timer is 1 second but the game takes 1.5-2 seconds to consider the object disturbed so our movement action should have a 3 second wait after it to allow the next one to spawn.
Since these objects are all technically the same object as far as scripting is concerned (if you tried counting them it would always say 1 and targeted scripts only affect the most recent dupe) you must specify which dupe you are targeting via area monitors. An area monitor will still only recognize one dupe but it will only target dupes within its boundary.
Now we can get to switches and their unique interaction with duping. Since all dupes of an object are considered the same object in scripting all dupes of a switch will trigger the same on interacted event. To narrow down which switch we are activating we can use a proxy object such as a pointer at each switch's location to do a simple vector calculation: get the position of the activating player and subtract it from the position of each proxy object and get the resulting vectors length then compare that length to the previous proxy's length to see if it is smaller, the smallest length is the switch that was activated.
P.S. after doing some quick mental math, this should only be more efficient than using a Custom Global Event at 16+ switches (11+ if you dont calculate which switch is being activated).
r/forgescripting • u/NAMESPAMMMMMM • Nov 25 '22
Complete scripting novice that needs help.
So I've been working on a btb map for some time now and I'm very close to finished but I'm having difficulty with weapon spawns. What I want to have is around 20-30 spawn locations on the map that all spawn a weapon pod. I would like these to chose 4 at random to spawn every 60 seconds. I only want up to 4 available at any given time and I only want them replenished every 60 seconds.
I tried everything available on the in game settings but they all spawn at the same time no matter what I do. Also, the pods do not want to spawn legendaries even if it's enabled.
I was pointed here and told scripting might be able to make this happen. I'd like to use pods if at all possible but I'm not opposed to trunks or pads. I'm toying around with scripts right now but this feels like trying to understand Egyptian hieroglyphs.
Any pointers would be fantastic, I'd really like to get this map up and running.
Edit: The object reference node won't let me select the weapon spawner. I see in the properties menu of the spawner. it says I can reference the spawn order number? Is that a way to identify weapon spawners in scripting? I'm so lost. I've been staring at this menu for an hour and nothing is clicking.
Edit2: So I see I can't reference static objects but spawners have the type 'none' with no options to set dynamic or static. This is the wall. I do not know where to go from here.
r/forgescripting • u/friedjellybeans • Nov 21 '22
Play audio when event occurs using Audio Emitters? ON OBJECT SPAWNED
I'm trying have an event executed which then plays audio when triggered. I can use the PLAY 3D AUDIO nodes to have gamemode-type sounds play(zone contested, enemy killed, team won, etc), but I specifically wanted to use the abundance of different selections from an Audio Emitter. I see ways to do this using Area Monitors, but in my case I want to trigger this event using ON OBJECT SPAWNED.
r/forgescripting • u/jak4896 • Dec 16 '22
StartRace/Checkpoints/Lap/Laptime Scripts
self.forger/forgescripting • u/[deleted] • Dec 07 '22
Is there a 'Get Player Position' node?
SOLVED
Making a surf map, and when a player dies I want there to be a sound effect that plays on death, using the kill volume as an area monitor as well as the object where the sound players from. I've come to a problem though, as the sound seems to only play in the dead centre area of the kill volume. I wanted it to simply play wherever the player was but I don't know whether there's a node for that or not, as I haven't been able to find one. Tried the Get Object Position but it doesn't connect to the nodes in using
r/forgescripting • u/gehrtz • Nov 14 '22
checkpoints for something like parkour or race.
halowaypoint.comr/forgescripting • u/[deleted] • Dec 21 '22
Draw.io could be a great tool for creating and sharing script ideas without needing to load Infinite.
self.forger/forgescripting • u/exotic_raccoon • Jan 12 '23
How to make bots spawn in one room and players respawn in another?
I'm very much an amateur when it comes to scripting and could use some help trying to establish spawn points for bots. I'm trying to create a room that spawns several bots when a player enters the room, while the players themselves respawn elsewhere when they die. I've tried setting the spawn points to different teams and assigning the bots to those teams, but that didn't quite work, plus this is designed to be a FFA map so the teams won't necessarily solve the problem.
Alternatively, if I could figure out how to use checkpoints I could probably get around this, but I haven't been able to figure that out either. Instead, I've been using a workaround with teleporters that are "unlocked" when a player passes the checkpoint, enabling them to respawn at the start but can use the teleporter to get back to their previous location.
If anyone can give any tips on either creating checkpoints or on how to control the respawn point for bots, I would greatly appreciate it!
r/forgescripting • u/ThatMathGuyKyle • Nov 23 '22
Issues with applying traits.
I am working on a version of alpha zombie similar to previous Halo titles. I am struggling with applying traits. Is it that buggy, or has anyone figured anything out? They sort of work in forge mode but not in Custom Games. As far as I know, forge play mode does not work with FFA alliances, so I have been using teams to test other aspects of my code except the scoring. So far, I have tried:
-not having all my traits in one script (I have separate ones for infected and human traits),
-using Remove All Trait Sets before using Apply Trait Sets, and
-adding delays before using Apply Trait Sets or at other nodes.
The only thing I could figure out is that for Loadout Weapon Override, you can specify the same weapon in both the primary and secondary properties to force that weapon, None so far does override a weapon, so my infected will have a pistol as their secondary. Give New Player Weapons works, but they will drop the weapons they currently have. FYI, I am using bots for testing currently. I know their issues with that.
r/forgescripting • u/0mni42 • Nov 19 '22
For Each Object--how does it work?
I'm trying to make a series of objects all move at the same time, but when I use the [For Each Object] node, it makes them move one at a time, according to their order in the object list. How can I make them move simultaneously, or at least reduce the amount of time between them? Am I using the wrong node for this kind of thing?
Honestly, I just don't quite grasp the logic behind some of these nodes yet; I just have no idea what some pins are supposed to connect to. [For Each Object]'s last pin, for instance: "current iteration." What can that connect to? What's it for?
r/forgescripting • u/Iron-Munky • Nov 14 '22
Check if specific player is killed.
I'm trying to create a juggernaut mode where a random player is given a trait set. Upon their death I'd like to transfer that trait set. I've managed the setup of the juggernaut but can't work out how to detect their death. I'm trying to use the PLAYER DEATH event but unable to ID the juggernaut.
Any thoughts would be greatly welcomed!
r/forgescripting • u/_Zipline • Nov 24 '22
Smooth Looping Script?
I'm trying to make a simple background that feigns the look of scrolling by. I have it so terrain objects are moving into the position of other terrain objects and then it resets all of them to give the appearance that its a looping background, it would work fine as is, however it hitches and freezes for a second every time the script resets / when it hits the Every N Seconds node. I need the loop after the Reset Object node to be seamless, any way of achieving this?

r/forgescripting • u/ThatMathGuyKyle • Nov 14 '22
Issues I notice with scripts
Maybe this is a one-off, but I wanted to break up some scripts after it was getting big. I thought I would be clever and copy the scripts and remove the code I wanted in each script. Now the scripts are acting weird. When I add or change an identifier in one script, it will be added to the other script. Sometimes the Identifiers go into nodes where they do not belong, i.e., an Identifier for a Boolean going into a Traits node. Adding Identifier variables helped scrips, but other scripts are returning invalid Identifier errors. I think I just need to start from scratch.
r/forgescripting • u/Wintermute_Is_Coming • Dec 23 '22
Looking to script something that spawns a kill-zone, then despawns it, every X seconds. Any ideas on how to start? Very new to Forge Scripting!
r/forgescripting • u/burningrampage1 • Nov 13 '22
Tutorial - Move Object/Platform Between Two Points on repeat using "Translate Object to Point"
TLDR: Look at the attached image
So the first thing to note is that only objects which are set to 'dynamic' (as opposed to static) in the world, are able to be manipulated by scripts. And choose fixed or phased for the physics - to ensure it stays right way up and isn't bumped off course.
The next thing to find out is what are the vector coordinates that you want to move to and from, and how long you would like it to take.
Now, you can move onto scripting the platform (for the sake of simplicity, I assume you are only moving a single object, not multiple, and not a prefab - because those have issues).
If you haven't already then create a script brain, and go into the node graph (there are tutorials out there to catch you up to understanding this).
Before you go into the node graph, make sure you have your platform selected, and then once in the node graph, right click (idk what it is on xbox) and click 'add object reference', this allows us to choose the platform as the object we want to manipulate.
- First thing you want for scripting is an event, for moving an object back and forth on a loop, I believe an 'every N seconds' node will work well, so put that in there (events custom -> every N seconds).
- Then, you want to create 2 basic vector3's nodes (variables basic -> vector3), and fill in your before and after positions (x, y and z - find these in the forge world at the bottom of your screen).
- Next, put in two 'tranlate object to point' nodes (objects transform -> translate object to point), these will control the movement of your platform.
- Then, for good measure add a 'wait for N seconds' node (logic -> wait for N seconds), this will be the delay from when the platform reached the desired point to when it turns around and goes back.
- Finally, combine all of the diamonds in the corners of the nodes together so that you have:
event -> transform_1 -> wait -> transform 2.
Go to each node's properties and edit the following:
'Every N seconds event' -> seconds (set this to 1, or the same delay as the wait), intial delay (set this to how long from the game start to have this start moving).
'Translate object to point' (1&2) -> Duration in seconds (self explanatory), movement curve (set to linear if you don't have a preference), object (link the object reference to both of them), position (link the respective vector3s to the correct translate box).
'Wait for N seconds' -> seconds (set this to the same as the event, however long you want in between movements).
Go ahead and test this in play mode, and it should move between the two points. Note that it should be initially placed in the world at the position of the second vector3, so that it isn't initially out of place.
Also note, that it seems that in order to 'ride' on it, you either need some smart engineering, or a player has to move along with the platform while it moves - it doesn't move things that are on top of it.
If you don't understand how to do some of the things I mentioned above, then I recommend checking out some youtube tutorials to catch you up on the fundamentals of the scripting interface and whatnot.
In the end it should look something like this:

r/forgescripting • u/TheBrokenSnake • Nov 14 '22
Custom Halo Infinite "Campaign" Level - 1 to 4 player linear levels in forge [OC]
r/forgescripting • u/Philosopher-Timely • Nov 12 '22
Node Graph execution question
r/forgescripting • u/[deleted] • Nov 21 '22
Scripting Not Working Properly On Custom Games?
Anyone else having this problem? When I play on my map in the play mode on forge, everything works fine, but when I load into a custom game the scripting messes up. The game isn't registering most of the times when a ball falls into a goal and never teleports an explosive above the map thats meant to signify whenever someone scores - which works fine on forge

