Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
Guest

Retail
Weaponless Vehicles

36 posts in this topic

Weaponless Vehicles

 

Introduction

 

In this tutorial, I will show you how to implement a Forge label which strips a vehicle of all of its weapons. All vehicles are compatible however note that the horn will also be removed from the Warthog and Mongoose. Vehicles without weapons will not have a reticle on the center of the screen.

Screenshots

 

KzdjbOd.png

>> Click here to see more screenshots

Concept

 

How does it work?

Firstly, the distance between the objects attached to the vehicle regardless of position is zero. Therefore, all we need to do is to create a trigger which loops through each object with the 'weaponless' filter. Store the current object to scratch object variable 0. Inside this trigger, add another trigger looping through each game object.

Next, we need to confirm that the object with the weaponless vehicle is not the same object in second trigger because the distance between an object and itself is zero.

Now we have (in pseudocode):

for each object with weaponless filter:

temp1 = current object

for each object:

temp2 = current object

distance = object_get_distance(temp1, temp2)

if temp2 =/= temp1 and distance = 0

object_delete(temp1)

end

end

end

That's all, right?! Not so fast, Sparky. All objects inside a vehicle will have a distance of zero including the player's biped and the player's equipments meaning they will also get deleted. What you need to do now is to check whether the current object has an owner player and whether the object is a biped.

I understand that you're in a hurry so here's the code.

KSoft Code

1. Add the following to the Megalo string table:

<String name="weaponless">    <String>weaponless</String></String>
2. Add the following to object filters:

<Filter labelIndex="weaponless" name="weaponless" />
3. Add the following trigger:

<Trigger execMode="OnObjectFilter" name="TriggerWeaponless" objectFilter="weaponless">  <Elements>    <E type="Action" name="VariableOperation">      <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />      <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="Iterator.Object" />      <Param type="OperationType">Set</Param>    </E>    <E type="Action" name="ActivateTrigger">      <Param type="TriggerReference">        <T type="Trigger" trigType="Subroutine" execMode="OnEachObject" name="Trigger0_Subroutine1">          <Elements>            <E type="Action" name="VariableOperation">              <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="ObjectScratch1" />              <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="Iterator.Object" />              <Param type="OperationType">Set</Param>            </E>            <E type="Action" name="VariableOperation">              <Param type="VarReference" varRefKind="Custom" varRefType="Scratch">NumericScratch1</Param>              <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>              <Param type="OperationType">Set</Param>            </E>            <E type="Action" name="ItemGetOwnerPlayer">              <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />              <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="PlayerScratch0" />            </E>            <E type="Action" name="ActivateTrigger">              <Param type="TriggerReference">                <T type="Trigger" trigType="Subroutine" execMode="OnEachPlayer" name="Trigger0_Subroutine1_Subroutine2">                  <Elements>                    <E type="Condition" name="Comparison" unionGroupID="-2">                      <Param type="VarReference" varRefKind="Object" varRefType="Player.SlaveObject" dataType="Iterator.Player" />                      <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="ObjectScratch1" />                      <Param type="ComparisonType">Equal</Param>                    </E>                    <E type="Action" name="VariableOperation">                      <Param type="VarReference" varRefKind="Custom" varRefType="Scratch">NumericScratch1</Param>                      <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                      <Param type="OperationType">Set</Param>                    </E>                  </Elements>                </T>              </Param>            </E>            <E type="Action" name="DistanceBetweenObjects">              <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />              <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />              <Param type="CustomReference" varRefType="Scratch">NumericScratch0</Param>              <Param type="Bool">False</Param>            </E>            <E type="Condition" name="Comparison" unionGroupID="-2">              <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />              <Param type="VarReference" varRefKind="Object" varRefType="ExplicitObjectType" dataType="Iterator.Object" />              <Param type="ComparisonType">NotEqual</Param>            </E>            <E type="Condition" name="Comparison" unionGroupID="-2">              <Param type="VarReference" varRefKind="Custom" varRefType="Scratch">NumericScratch0</Param>              <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>              <Param type="ComparisonType">Equal</Param>            </E>            <E type="Condition" name="Comparison" unionGroupID="-2">              <Param type="VarReference" varRefKind="Custom" varRefType="Scratch">NumericScratch1</Param>              <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>              <Param type="ComparisonType">Equal</Param>            </E>            <E type="Condition" name="Comparison" unionGroupID="-2">              <Param type="VarReference" varRefKind="Player" varRefType="ExplicitPlayerType" dataType="PlayerScratch0" />              <Param type="VarReference" varRefKind="Player" varRefType="ExplicitPlayerType" dataType="NONE" />              <Param type="ComparisonType">Equal</Param>            </E>            <E type="Action" name="DeleteObject">              <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />            </E>          </Elements>        </T>      </Param>    </E>  </Elements></Trigger>

WumboScript Code

define event tick    for each current_object0 in objects matching filters.weaponless do        for each current_object1 in objects do            skipped = 0            owner = object_get_owner_player(current_object1)            for each current_player0 in players do                if current_player0.biped = current_object1 then                    skipped = 1                end            end            distance = object_get_distance_between(current_object1, current_object0, false)            if current_object0 != current_object1 and distance = 0 and skipped = 0 and owner = none then                object_delete(current_object1)            end        end    endend
Edited by synth92

Share this post


Link to post
Share on other sites

Hey Synth, I added this label to a CTF gametype and it works fine aside from one issue: the flag is deleted when a carrier goes into a weaponless vehicle.

 

I know why it does this thanks to the OP: A command deletes everything except the vehicle itself, but more code is added to save the player's biped and whatever he owns (although the Flag Carrier owns the Flag right?).

 

How would I go about saving the Flag too?

Share this post


Link to post
Share on other sites

Hey Synth, I added this label to a CTF gametype and it works fine aside from one issue: the flag is deleted when a carrier goes into a weaponless vehicle.

 

I know why it does this thanks to the OP: A command deletes everything except the vehicle itself, but more code is added to save the player's biped and whatever he owns (although the Flag Carrier owns the Flag right?).

 

How would I go about saving the Flag too?

Use the ObjectIsSameType condition to check if the an object isn't a flag.

Share this post


Link to post
Share on other sites

in h4 or reach pick up wraith or scorpion in forge and throw it though kill ball with out letting go of it in forge take it out and the tanks wont have cannons lol 

Share this post


Link to post
Share on other sites

So how does this work? Do you need a JTAG for this to work, or can it be transfered to a custom gametype and be played on online in custom games?

This is a gametype mod so you can play this on Xbox Live although I don't think there's a gametype on Waypoint with this mod. Maybe someone can make one for you.

Share this post


Link to post
Share on other sites

If somebody could then I would be extremely grateful. I love all these H4 mods going around and with the recent release of the Turretless warthog, troop hog and falcon chingun on Halo: Reach, us on H4 are getting pretty jealous lol.

 

Anyway if anybody can get that onto waypoint so we can download it that would be great!

Keep up the good work guys!


This is a gametype mod so you can play this on Xbox Live although I don't think there's a gametype on Waypoint with this mod. Maybe someone can make one for you.

Also, (and I'm sorry if I'm clogging up the forum here) with this gametype, if somebody did make it and we downloaded it would we be able to change the settings or would that ruin the mod? And does the mod effect every warthog on the map, or can it be targeted to specific ones?

Share this post


Link to post
Share on other sites

If somebody could then I would be extremely grateful. I love all these H4 mods going around and with the recent release of the Turretless warthog, troop hog and falcon chingun on Halo: Reach, us on H4 are getting pretty jealous lol.

 

Anyway if anybody can get that onto waypoint so we can download it that would be great!

Keep up the good work guys!

Also, (and I'm sorry if I'm clogging up the forum here) with this gametype, if somebody did make it and we downloaded it would we be able to change the settings or would that ruin the mod? And does the mod effect every warthog on the map, or can it be targeted to specific ones?

It only affects the weapons with a label of "weaponless" set in forge. Settings can be affected fine, this runs a trigger which can't be modified by the user on the xbox. The trigger deleted all attachments on anything with the "weaponless" label set to it.

 

I can make a gametype that features this for you.  What base gametype do you want? As in Slayer, CTF, etc.

Share this post


Link to post
Share on other sites

It only affects the weapons with a label of "weaponless" set in forge. Settings can be affected fine, this runs a trigger which can't be modified by the user on the xbox. The trigger deleted all attachments on anything with the "weaponless" label set to it.

 

I can make a gametype that features this for you.  What base gametype do you want? As in Slayer, CTF, etc.i 

I would love it if you could do that. Thank you so much! 

If you could set it for slayer then that would be great. 

Edited by LingLing Killer

Share this post


Link to post
Share on other sites

I would love it if you could do that. Thank you so much! 

If you could set it for slayer then that would be great. 

Here's your game!

 

Make sure to head into forge and set one of the gametype labels to "weaponless" on any vehicles you want it to affect before playing. Enjoy! :smile:

Share this post


Link to post
Share on other sites

Setting a multitude of objects to weaponless has rendered custom games on the map almost unplayable due to the lag, is there any specific reason to this?

Share this post


Link to post
Share on other sites

Setting a multitude of objects to weaponless has rendered custom games on the map almost unplayable due to the lag, is there any specific reason to this?

How many vehicles? Cuz the most I've ever had was 6 vehicles and it didn't lag at all. It shouldn't be lagging at all.

Share this post


Link to post
Share on other sites

How many vehicles? Cuz the most I've ever had was 6 vehicles and it didn't lag at all. It shouldn't be lagging at all.

I'm going to assume as many as you can that have weapons out. This is cool though. Would this remove the banshee's weapons all together though? Just curious.

Share this post


Link to post
Share on other sites

I'm going to assume as many as you can that have weapons out. This is cool though. Would this remove the banshee's weapons all together though? Just curious.

Yes you can drive in any vehicle with the label but not shoot including the Banshee

Share this post


Link to post
Share on other sites

Setting a multitude of objects to weaponless has rendered custom games on the map almost unplayable due to the lag, is there any specific reason to this?

I've played games with numerous vehicles with no guns and I'm not getting any lag. It might just be your connection or the map that your playing on.

Share this post


Link to post
Share on other sites

I have something slightly strange to report.  I was checking to see if this was fully functional (i.e. if it worked for all vehicles without any unintended, strange side effects), and, unsurprisingly, it worked flawlessly with all of the main vehicles.  On a whim, I decided to also try it with a Shade Turret and a human mounted machine gun.  Whilst it worked with the MMG, it was entirely unsuccessful with the Shade Turret.  Another strange aspect that I noticed was that the mod seemingly turned off honking for the Mongoose and Warthog.  

 

Thanks for the gametype!

Share this post


Link to post
Share on other sites

 

Thanks for the gametype!

Another strange aspect that I noticed was that the mod seemingly turned off honking for the Mongoose and Warthog.  

This would be because the horns are actually weapons.

Share this post


Link to post
Share on other sites

So just out of curiosity, what happens when you don't put conditions on this? Do the biped's weapons, AA, etc get deleted? Does it delete the first-person view? I haven't tried it without using an ObjectIsSameType. I'm afraid the universe will implode.

Share this post


Link to post
Share on other sites

So just out of curiosity, what happens when you don't put conditions on this? Do the biped's weapons, AA, etc get deleted? Does it delete the first-person view? I haven't tried it without using an ObjectIsSameType. I'm afraid the universe will implode.

I believe it deletes everything on the player as well, including the player's biped itself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0