DM-SC-Anniversary-HB-SE

Mapmaking? Modeling? Discuss all that stuff that's too complicated for most mere mortals here.
DW_Ant
DW Clan Member
Posts: 2670
Joined: Sat Jun 21, 2008 11:00 pm
Location: North Carolina

I've created a simple actor for my Mapper Tools package. This DWUseTrigger actor is able to toggle its enabled property simply by triggering its tag. I think there's a myleveled version in the latest Absolute Hell map (in the third trial room).

Code: Select all

//===========================================
//DWUseTrigger
//A simple Use trigger that checks to see if
//the pawn has the bCanUse property or not.
//Date:  May 08, 2010
//===========================================

class DWUseTrigger extends UseTrigger
placeable;

var(UseTrigger)   bool        bEnabled;       //Activates this DWUseTrigger.  This may be toggled by triggering an event matching its tag.

function Touch( Actor Other )
{
    if ( Pawn(Other) != None )
    {
        // Send a string message to the toucher.
        if( Message != "" )
            Pawn(Other).ClientMessage( Message );

        if ( AIController(Pawn(Other).Controller) != None && Pawn(Other).bCanUse)
            UsedBy(Pawn(Other));
    }
}

function UsedBy( Pawn user )
{
    if (bEnabled)
        TriggerEvent(Event, self, user);
}

function Trigger( actor Other, pawn EventInstigator )
{
    bEnabled = !bEnabled;
}

defaultproperties
{
    bEnabled=True
}
For your scripted trigger, simply add TriggerEvent matching the Use Trigger's tag to disable it right after the wait for event. Then right before it returns to WaitForEvent, add another TriggerEvent matching the Use Trigger's tag to enable it, again.
The difference between successful people from others is
not in the lack of strength,
not in the lack of knowledge,
but rather in the lack of will.

FFE466

_________________________
{F}{AH}{CivFR}{XC}{U}{DF}{CJ}{SD}
DW_Apok@lypse
DW Clan Member
Posts: 356
Joined: Wed Apr 22, 2009 5:09 am
Xfire: apokalypse86
Location: Leonberg, Germany
Contact:

Thank you very much Ant. I gonna try the new Trigger soon. Sorry for the long wait. There are some new changes and this will be the final version :ssmile: .

- There will be only 12 rooms
- There will be a garden.
- 3 sepperate trials (ramdom function)
- Current size of map 23,0 MB (estimated final size 35,0 MB)

wish you all the best

Apo :sbigsmile:
Energy-Plant -> Elimination-Chamber -> Crossfire-Xtreme -> Anniversary
Nano-Technics -> Choco-Wars -> Dragon-Tower ->
(Next Map Fall 2016) Survive
DW_Apok@lypse
DW Clan Member
Posts: 356
Joined: Wed Apr 22, 2009 5:09 am
Xfire: apokalypse86
Location: Leonberg, Germany
Contact:


short update:
- There will be only 12 rooms
[s]- There will be a garden.[/s]
(to big :ssad: , would cause lag in gameplay)
- 3 sepperate trials (ramdom function)
- Current size of map 25,0 MB (estimated final size 35,0 MB)

I changed something in the entrance room

Apo :sbigsmile:
Energy-Plant -> Elimination-Chamber -> Crossfire-Xtreme -> Anniversary
Nano-Technics -> Choco-Wars -> Dragon-Tower ->
(Next Map Fall 2016) Survive
DW_Ant
DW Clan Member
Posts: 2670
Joined: Sat Jun 21, 2008 11:00 pm
Location: North Carolina

Apok@lypse wrote:[s]- There will be a garden.[/s](to big, :ssad: )
Maybe you don't need to designate a full room to be a garden. You could have the garden scattered throughout the mansion (plants in the hallways and lobbies).
The difference between successful people from others is
not in the lack of strength,
not in the lack of knowledge,
but rather in the lack of will.

FFE466

_________________________
{F}{AH}{CivFR}{XC}{U}{DF}{CJ}{SD}
DW_Apok@lypse
DW Clan Member
Posts: 356
Joined: Wed Apr 22, 2009 5:09 am
Xfire: apokalypse86
Location: Leonberg, Germany
Contact:

You mean plants in main hall? Would that be not to much static meshes?
Ok, good idea :ssmile: .

One question about the Unreal Script. Is the script language Java and C++? Because some points are in C++ and some i knew in Java :sbigsmile: .
Energy-Plant -> Elimination-Chamber -> Crossfire-Xtreme -> Anniversary
Nano-Technics -> Choco-Wars -> Dragon-Tower ->
(Next Map Fall 2016) Survive
DW_Ant
DW Clan Member
Posts: 2670
Joined: Sat Jun 21, 2008 11:00 pm
Location: North Carolina

Static meshes will not cause lag (networking lag). They'll only reduce performance (frame rates).

Judging based in how you structured the mansion, you should be able to optimize the map easily since it's enclosed and BSP surfaces divides the rooms. If this was an open map, you may have more difficulty optimizing the entire map.

Unreal Script is mostly based on Java but C++ programmers can easily learn UScript. You should check out the Unreal Script for CPlusPlus Programmers link.
The difference between successful people from others is
not in the lack of strength,
not in the lack of knowledge,
but rather in the lack of will.

FFE466

_________________________
{F}{AH}{CivFR}{XC}{U}{DF}{CJ}{SD}
DW_Apok@lypse
DW Clan Member
Posts: 356
Joined: Wed Apr 22, 2009 5:09 am
Xfire: apokalypse86
Location: Leonberg, Germany
Contact:

Thank you very much for helping me Ant :ssmile: .

How can i make a if-then-else statement in Unrealed and ewhen does lucifer spawn in wave 16? Because i found something special.

Apo :sbigsmile:
Energy-Plant -> Elimination-Chamber -> Crossfire-Xtreme -> Anniversary
Nano-Technics -> Choco-Wars -> Dragon-Tower ->
(Next Map Fall 2016) Survive
DW_Ant
DW Clan Member
Posts: 2670
Joined: Sat Jun 21, 2008 11:00 pm
Location: North Carolina

There's a trigger built for this kind of thing.
A TriggeredCondition (found under triggers), is a simple trigger that can flip it's enabled property whenever some event matches its tag.

Properties:
bToggled: this will make the triggered condition flip 'on and off' every time some event triggered its tag.
bTriggeredControlled: the bTriggeredControlled property enables the trigger to flip 'on and off' when some player is within some trigger's proximity whose events matches the TriggeredCondition's tag property. It'll return to its original state when the player leaves the trigger's proximity range. This is how the Power Controls system works in DM-Flight.
bEnabled: bEnabled property sets its initial condition. Do you want it to start on or start off?

Here's a small example that may help you out. Say I want to create an event where the players may only open some door between waves 3 - 7:
First, I'll place a door (state TriggerOpenedTimed) and Tag: Door
Then I'll place a UseTrigger with event UseButton
Then I'll place a TriggeredCondition with tag DoorCondition (note: Events for this actor should be left blank)
In the TriggeredCondition actor, I'll make sure the bToggled property is on.

I'm going to place a scripted trigger with the following sequence
[0]WaitForEvent
-ExternalEvent = InvWave3
[1]TriggerEvent
-Event = DoorCondition (I've just enabled the TriggeredCondition)
[2]WaitForEvent
-ExternalEvent = InvWave7
[3]TriggerEvent
-Event = DoorCondition (I've just disabled the TriggeredCondition)
[4]DisableThisScript (not really needed)

I'm going to place another scripted trigger that'll check this condition before opening the door.
[0]WaitForEvent
-ExternalEvent = UseButton
[1]ACTION_ifCondition
-TriggeredConditionTag = DoorCondition (If Door condition is true, then it'll move to next sequence. Else it'll move to next End Section)
[2]TriggerEvent
-Event = Door (Open the door)
[3]DisplayMessage (optional)
-Message = "The Door is open for now."
[4]GoToAction
-ActionNumber = 0 (Jump back to the beginning)
[5]EndSection (This is the place where the sequence will jump to if the condition is false.)
[6]DisplayMessage (optional)
-Message = "This button is not in operation. Please contact maintenance for assistance."
[7]GoToAction
-ActionNumber = 0 (Jump back to the beginning)
The difference between successful people from others is
not in the lack of strength,
not in the lack of knowledge,
but rather in the lack of will.

FFE466

_________________________
{F}{AH}{CivFR}{XC}{U}{DF}{CJ}{SD}
DW_Apok@lypse
DW Clan Member
Posts: 356
Joined: Wed Apr 22, 2009 5:09 am
Xfire: apokalypse86
Location: Leonberg, Germany
Contact:

Thank you very much Ant :ssmile: ,

The example was good with the TriggerCondition :thumbright: .

Can i use Warp Zones in Invasion?

Apo :ssmile:
Energy-Plant -> Elimination-Chamber -> Crossfire-Xtreme -> Anniversary
Nano-Technics -> Choco-Wars -> Dragon-Tower ->
(Next Map Fall 2016) Survive
DW_Ant
DW Clan Member
Posts: 2670
Joined: Sat Jun 21, 2008 11:00 pm
Location: North Carolina

Of course you can!
Enigma and PacMonster contain warpzones. Why not another? They're a cool effect. Just be cautious of the warpzone's flaws.
The difference between successful people from others is
not in the lack of strength,
not in the lack of knowledge,
but rather in the lack of will.

FFE466

_________________________
{F}{AH}{CivFR}{XC}{U}{DF}{CJ}{SD}
Post Reply