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
Implementing Object Attaching System In Any Game Type

3 posts in this topic

KSoft.Tool

1. Find <ObjectFilters> and add to this element:

<Filter labelIndex="attach_parent" name="attach_parent" /><Filter labelIndex="attach_child" name="attach_child" />
 

2. Find <StringTable baseNameIndex="BaseName"> and add to this element:

<String name="attach_parent">    <String>attach_parent</String></String><String name="attach_child">    <String>attach_child</String></String>
 

3. Go to the bottom of the XML file and add the following trigger at the end of the <Triggers> element. I added comments to help you understand the code better.

<!-- Go through all objects with the attach_parent label --><Trigger execMode="OnObjectFilter" name="TriggerAttach" objectFilter="attach_parent">    <Elements>        <!-- Store parent object reference to scratch variable 0 -->        <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>        <!-- Call a subroutine trigger -->        <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">                <!-- Go through all objects with the attach_child label -->                <T type="Trigger" trigType="Subroutine" execMode="OnObjectFilter" name="TriggerAttach_Subroutine15" objectFilter="attach_child">                    <Elements>                        <!-- Check if the user data of the parent object and child object match -->                        <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="Unknown8" dataType="ObjectScratch0" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Unknown8" dataType="Iterator.Object" />                            <Param type="ComparisonType">Equal</Param>                        </E>                        <!-- Attach child object to parent object -->                        <E type="Action" name="AttachObject">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="ObjectScratch0" />                            <Param type="UInt24">0</Param>                            <Param type="Bool">True</Param>                        </E>                    </Elements>                </T>            </Param>        </E>    </Elements></Trigger>

WumboScript

1. Add standard labels attach_child and attach_parent.

2. Define the tick event if one does not exist.

3. Add the following code to the tick event.

for each current_object0 in objects matching filters.attach_parent do    temp_object0 = current_object0    for each current_object1 in objects matching filters.attach_child do        if temp_object0.user_data = current_object1.user_data then            object_attach_relative(current_object1, temp_object0, 0, true)        end    endend
Edited by synth92

Share this post


Link to post
Share on other sites

I know im probably making myself out to be an idiot, but how does one save wumboscript to the gametype? Im relatively new to the gametype modding scene... :/

Share this post


Link to post
Share on other sites

I know im probably making myself out to be an idiot, but how does one save wumboscript to the gametype? Im relatively new to the gametype modding scene... :/

 

The Wumboscript viewer is simply that, a VIEWER. Basically, all it does is convert .xml into a language (which Matt developed, I believe) that's easier to understand... you still have to use KSoft to decode variant files and encode the .xml files.

Edited by Pfeuff

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