Forum

> > CS2D > Maps/Editor > Delay Problem (Editor)
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English Delay Problem (Editor)

17 replies
To the start Previous 1 Next To the start

old Delay Problem (Editor)

Mawd
User Off Offline

Quote
Is there anyway to disable the trigger_delay at the very start of the map?
The trigger_start just wont work, it enables the trigger_delay at the start of the map.

I wanna make a disabled delay(lets say delay A) and make it trigger'able' for another looping delay(B & C). Then when you walk to a specific location(trigger_move), the trigger_move enables delay A, then B & C will be able to trigger delay A.

No lua please.

Offtopic:
Spoiler >

old Re: Delay Problem (Editor)

Yates
Reviewer Off Offline

Quote
I lol'd actually.
Just don't use the trigger start. Why would you want to trigger something with a start trigger when you don't want to trigger it.

You DONT need lua.

Edit: Lulz wtf, reading your post better I have no idea what you're talking about. Explain better. Damn tired, but this is what he wants, if I'm not mistaken.
A delay that triggers delay B and C?
A move that triggers delay A.
To be honest, I think I'm wrong otherwise he wouldn't be asking.

old Re: Delay Problem (Editor)

Mawd
User Off Offline

Quote
user Yates has written
A delay that triggers delay B and C?
A move that triggers delay A.
To be honest, I think I'm wrong otherwise he wouldn't be asking.


First, trigger_move triggers the disabled delay A, and then, delay A was triggered by a looping delay B and C because delay A was enabled.

I just need to know how to disable/enable the delay.

old Re: Delay Problem (Editor)

iCe4147
User Off Offline

Quote
The trigger_move must trigger both A,B, and C then your B and C will trigger A

So I will give you this:
Make sure to keep track of the brackets.

(Trigger_Move [A,{B,C}])

As you can see A, B and C are inside the brackets of trigger_move meaning they are triggered at the same time. So it leaves B and C to start their loop to trigger A. While B and C are simply triggering themselves making a loop.

--------------------------------------------------

To loop delay B and C they must trigger themselves!!
Ex:
Trigger_Delay
Name: iamb
Trigger: iamb
edited 1×, last 04.05.11 08:35:13 am

old Re: Delay Problem (Editor)

Mawd
User Off Offline

Quote
Doesn't work for me, maybe I did something wrong, but can you explain it in a form like this and send it to me via PM:
(TriggerName)
Name:
Trigger:

old Re: Delay Problem (Editor)

iCe4147
User Off Offline

Quote
user Mawd has written
Doesn't work for me, maybe I did something wrong, but can you explain it in a form like this and send it to me via PM:
(TriggerName)
Name:
Trigger:


It should work. Well is this for a door or something?
Oh right did I forget to mention that you may use trigger_start to trigger B and C?

old Re: Delay Problem (Editor)

Unknown_Soldier
User Off Offline

Quote
I want to know (maybe I didn't understand you) if you want to do this:

trigger_move = M
trigger_delay A = A
trigger_delay B = B
trigger_delay C = C

so:
M triggers A
A triggers B
B triggers C
C triggers A
A triggers B and so on

if you want that, you can do it without lua.

But if you want to stop the infinite loop, then you need lua. (or another delay to reset the timer every time)

old Re: Delay Problem (Editor)

Mawd
User Off Offline

Quote
It's for a "something", not door.
Just post it again using the form I given.

Edit:
Again.. Doesn't work.
The two object which is triggered by delay A, B, C, appears at the same time.

Alright, seems you all don't get it, I will just say the whole story,
SPOILER ALERT!
Spoiler >
edited 1×, last 04.05.11 04:27:30 pm

old Re: Delay Problem (Editor)

Night Till Death
User Off Offline

Quote
if you want sort of a looping style like i did do this

trigger_start/move/hit - (A)trigger_once & lights sprite & items or manneequips(as you say) - trigger_delay(b)(10) trigger_delay(c/d)(20) - triggers lights off
this will turn the lights off in 10 seconds & turn them on in 20

trigger_delay(d)(2) - triggers delay b that will automaticly trigger B after the seconds pass... if done right it will loop

Thats what i use for my NPC spawn

old Re: Delay Problem (Editor)

Unknown_Soldier
User Off Offline

Quote
I understood this:
The delay B and C triggers a light on and off (infinite loop)

when you are in front of the door, you activate the delay A, that delay activates monsters (mannequins whatever), but they appear only if the lights are off, otherwise they appear later (when the delay turns off the light)

if I understood right, You need lua

old Re: Delay Problem (Editor)

Mawd
User Off Offline

Quote
user Unknown_Soldier has written
I understood this:
The delay B and C triggers a light on and off (infinite loop)

when you are in front of the door, you activate the delay A, that delay activates monsters (mannequins whatever), but they appear only if the lights are off, otherwise they appear later (when the delay turns off the light)

if I understood right, You need lua


YES, that's exactly what I'm saying!

old Re: Delay Problem (Editor)

Unknown_Soldier
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
A="" --trigger delay A name here
B="" --trigger delay B name here, it turns the lights on
C="" --trigger delay C name here, it turns the lights off
M="" --name of the monsters entities here
Lights=0

addhook("trigger","fearmoment")
function fearmoment(trigger)
	if(trigger==B)then
		Lights=1 --on--
	elseif(trigger==C)then
		if(Lights==2)then
			parse("trigger "..M) --Lights are off, monsters can spawn
		else
			Lights=0 --off--
		end
	end
	if(trigger==A)then
		if(Lights==0)then
			parse("trigger "..M) --you are in front of the door and lights are off
		else
			Lights=2 --you are in front of the door, but lights are on
		end
	end
end

just don't trigger the monsters with delay A, lua does

old Re: Delay Problem (Editor)

KimKat
GAME BANNED Off Offline

Quote
If you want to avoid triggering the trigger "A" at start just don't trigger it, the trigger won't be activated but it'll remain on the map. If you want to trigger B and C then do the following.

Create entities with trigger_delay with these values.

Name: A
Value: a1

Name: B
Value: b1,c1

It's really simple to work with triggers... just try and you'll understand.

old Re: Delay Problem (Editor)

Mawd
User Off Offline

Quote
Thank you all for your help, I really appreciate it
I'll credit you guys.

Edit:
@Unknown Soldier After removing the examples you given in the lua, I started a server with the correct delay and triggers, it says
1
LUA ERROR: sys/lua/fearmoment.lua:1 unexpected symbol near 'i"

The lua I edited:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
A="A" 
B="B" 
C="C" 
M="M" 
Lights=0

addhook("trigger","fearmoment")
function fearmoment(trigger)
     if(trigger==B)then
          Lights=1 
     elseif(trigger==C)then
          if(Lights==2)then
               parse("trigger "..M) 
          else
               Lights=0 
          end
     end
     if(trigger==A)then
          if(Lights==0)then
               parse("trigger "..M) 
          else
               Lights=2 
          end
     end
end
(They are in space form, it looks confusing here, I just tried TAB but it doesn't work for me :))

Btw, the player must be infront of a dynwall(lets say D), which is a door, the player was actually standing on a trigger_move infront of the door, and it triggers the mannequin when the lights are off.

If you finished this code, please make 5 times of this.
Thank you.
edited 6×, last 05.05.11 03:10:52 am
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview