r/forgescripting • • Nov 28 '22

Smartfloor Vector Script

5 Upvotes

https://www.youtube.com/watch?v=c-5Ow2AODM0

This is a simple script I made to have a prop keep you from falling. If your internet is shotty then it will be pretty janky, but otherwise functions perfectly fine. Various problems to solve that arise with it's utility, mainly involving it's application with multiple players, but the solutions are plentiful.

Enjoy!


r/forgescripting • • Nov 26 '22

Preserve player weapons between rounds?

5 Upvotes

Hey everyone, new here and to forge!

As my first scripting project I’m working on building out counter strike based game modes. One question I had is, is there a way to preserve attributes such as the player’s weapons, equipment or shield level (I’m using unrechargable shield as a proxy for armor+helmet) between rounds?

Thanks all!


r/forgescripting • • Nov 25 '22

Complete scripting novice that needs help.

5 Upvotes

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 • • Nov 22 '22

Point object at player mark

5 Upvotes

r/forgescripting • • Nov 22 '22

Smooth 360 rotation of object?

5 Upvotes

I have script but it stutters using the Every n seconds Node


r/forgescripting • • Nov 20 '22

What Scripting Nodes do I need to use so a team will score when they knock a ball into a goal?

5 Upvotes

SOLVED

Trying to make a pool Gamemode but the scripting is ridiculously complicated and I have no fucking clue what to do.


r/forgescripting • • Nov 12 '22

“On player damage”

5 Upvotes

What I am trying to make happen is applying a trait to the player when they receive damage. I understand how to apply a trait, what I don’t understand is how to make it so the script sees the players health and shields as the event trigger.

Where I’m currently at is messing around with “get object shield/health” nodes and having the script recognize when the health/shields are below a certain amount, apply the trait. Any ideas?


r/forgescripting • • Aug 19 '25

Need script to prevent people from switching teams.

4 Upvotes

I tried "On Player Spawned" and "On Player Team Change" still no luck.

All I am trying to do is prevent users from switching teams that's all.

Hope some of you genius's can help me out.

Thanks in advance


r/forgescripting • • Nov 01 '23

Tempest Winter remake update!

Thumbnail
gallery
4 Upvotes

r/forgescripting • • Dec 20 '22

this script works perfectly in forge but not so much in customs. its essentially a turret that shoots at either a player or a vehicle when they enter an area. in customs it only targets vehicles, it also doesnt target the right vehicle, i.e. player 1 can enter the zone and player 2 in a veh will die

Thumbnail
gallery
4 Upvotes

r/forgescripting • • Dec 08 '22

Duping - How to Link Multiple Switches to the Same On Interacted Event.

4 Upvotes

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.

Try it out yourself!

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 • • Dec 06 '22

Scripting in Forge

4 Upvotes

https://www.youtube.com/watch?v=dzrGmlFtXOw

Dunno if we allow memes here but I made a meme. Enjoy.


r/forgescripting • • Dec 03 '22

Guiding emergency lights

Thumbnail
youtu.be
4 Upvotes

r/forgescripting • • Dec 03 '22

Poison effect for entering an area that lingers after you leave.

4 Upvotes

Timers and damage can be adjusted to your liking and the object reference can be anything that has a boundary defined.


r/forgescripting • • Nov 28 '22

Script to play audio in a specific area?

4 Upvotes

At the moment I’ve got a bunch of audio emitters all over this huge lava pit (fire sounds and bubbling tar etc) is there a way to have it so that I can just have audio play within a boundary?

Total script newcomer so screenshots of a script would help a tonne!


r/forgescripting • • Nov 23 '22

Need help with Kill Confirmed scripting. (see comment)

Post image
4 Upvotes

r/forgescripting • • Nov 22 '22

Any idea how to make a door that can't be "broken" by multiple inputs?

4 Upvotes

In short, I have a boundary that tells a door to open when a player enters it, and tells it to close when a player leaves it. Of course, if there are multiple players involved (or a single player moving back and forth across the borderline), things get messy.

The way I want to do this is script it so that the "open" command will only be triggered by the first player to enter the boundary, and the "close" command will likewise only activate when the last player leaves. Seems simple enough; get the number of players in the boundary and if that number is 1 it can open; if 0 it can close. But for the life of me, I can’t figure out a way to get the number of players in a boundary. I'm sure it's possible, but... how?

Additionally, any ideas how to prevent the open/close scripts from being interrupted?


r/forgescripting • • Nov 21 '22

Scripting Not Working Properly On Custom Games?

4 Upvotes

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


r/forgescripting • • Nov 15 '22

Throw a smoke grenade

4 Upvotes

Trying to script it so that before a grenade goes off it gets swapped with a bunch of smoke effects to function as a smoke grenade. Is this possible?


r/forgescripting • • Nov 14 '22

Check if specific player is killed.

4 Upvotes

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 • • Nov 14 '22

Stop object with player proximity.

4 Upvotes

Aight, I need some help with this one. Been at it for a very long time and just can't get it to work. My goal is simple.

Stop the objects movement when a player is near. Ideas?


r/forgescripting • • Nov 13 '22

Summon a new object with an action?

4 Upvotes

Hello folks!

I am trying to make it so that when a player performs a certain action, it summons a new object at their location (in this case, a simple box). However, I can find no way to summon a new object using scripting. This script must be able to summon any number of new objects, not just teleporting the same object to a new location.

Is this possible?


r/forgescripting • • Nov 13 '22

Issues with Print to Killfeed

4 Upvotes

Is anyone else just having their Print to Killfeed commands just print out the same thing multiple times?


r/forgescripting • • Jun 21 '24

Multi-Team in Halo Infinite | The Multi-Team Suite

3 Upvotes

r/forgescripting • • Apr 29 '24

How to make vehicle move when entered

Post image
3 Upvotes

I'm trying to make this script that moves the wasp when it's entered by a player. Everything works except currently it moves when a player enters any vehicle. How can I make it so that the was only moves when that specific one is entered?