Page 7 of 10
Re: DM-SC-Anniversary-HB-SE
Posted: Sun Jan 23, 2011 1:18 am
by DW_Ant
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.
Re: DM-SC-Anniversary-HB-SE
Posted: Fri Jan 28, 2011 8:15 am
by DW_Apok@lypse
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:
Re: DM-SC-Anniversary-HB-SE
Posted: Tue Feb 01, 2011 7:06 pm
by DW_Apok@lypse
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:
Re: DM-SC-Anniversary-HB-SE
Posted: Tue Feb 01, 2011 7:10 pm
by DW_Ant
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).
Re: DM-SC-Anniversary-HB-SE
Posted: Tue Feb 01, 2011 7:12 pm
by DW_Apok@lypse
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: .
Re: DM-SC-Anniversary-HB-SE
Posted: Tue Feb 01, 2011 8:18 pm
by DW_Ant
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.
Re: DM-SC-Anniversary-HB-SE
Posted: Sun Feb 06, 2011 8:38 am
by DW_Apok@lypse
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:
Re: DM-SC-Anniversary-HB-SE
Posted: Sun Feb 06, 2011 4:39 pm
by DW_Ant
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)
Re: DM-SC-Anniversary-HB-SE
Posted: Sat Feb 12, 2011 8:45 pm
by DW_Apok@lypse
Thank you very much Ant :ssmile: ,
The example was good with the TriggerCondition :thumbright: .
Can i use Warp Zones in Invasion?
Apo :ssmile:
Re: DM-SC-Anniversary-HB-SE
Posted: Sat Feb 12, 2011 9:08 pm
by DW_Ant
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.