Seriously!

Go Back   Seriously! Forums > Serious Sam Series > Serious Sam HD

Serious Sam HD Discuss anything and everything about Serious Sam HD, the official remake of SS:FE on Serious Engine 3.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-26-2013, 12:36 PM   #1   Add To Ignore List  
Werebull
 
serioustime's Avatar
 
Joined: May 2011
 
serioustime is offline
Default What's wrong with this code?

Code:
Wait (Delay (5))

while not worldInfo:IsWarmupFinished() do
  Wait(Delay(0.1))
end

Walker_Blue:SpawnMaintainGroup()

RunHandled(
  function()
    WaitForever()
  end,  

OnEvery (Any(
    Times(8, Event(Walker_Blue.OneKilled)),
    Delay(5))),
  function()
   Walker_Red:SpawnGroup()
  end  
)
Blue walkers should spawn at first, and for every 8 kills, spawn a group of red walkers. But instead, the red walkers spawn immediately from the first. What's wrong?
__________________
Time is serious, don't waste it.
SeriousTime's Maps
  Reply With Quote
Old 07-26-2013, 01:12 PM   #2   Add To Ignore List  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline
Default Re: What's wrong with this code?

As far as I know, RunHandled goes above the Walker_Blue spawning. Also, I don't think it's a good idea to spawn enemies just after the level started. Always need to give time for players to get ready properly, especially in coop where not everyone connects to the game at the same time due to ping.

Btw, is this SS3 or SSHD? You don't need scripts for SSHD.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
  Reply With Quote
Old 07-26-2013, 01:26 PM   #3   Add To Ignore List  
Werebull
 
serioustime's Avatar
 
Joined: May 2011
 
serioustime is offline
Default Re: What's wrong with this code?

Actually, this is for a SSHD survival map. Since most of the official survival maps use scripts I figured about using them too instead of triggers.

EDIT: Nothing worked. Guess I'll switch to triggers.
__________________
Time is serious, don't waste it.
SeriousTime's Maps

Last edited by serioustime; 07-26-2013 at 01:35 PM.
  Reply With Quote
Old 07-26-2013, 02:00 PM   #4   Add To Ignore List  
Developer Fairy
 
Solais's Avatar
 
Croteam Representative
Joined: Nov 2009
 
Solais is offline
Default Re: What's wrong with this code?

Many spawns in survival doesn't depend on how many/what kind you kill, it's just an endless stream of enemies, that gets more added to it as time passes.
__________________
Since Old Lost Age I Shine

My Serious Sam 3/HD Workshop


While I do work for Croteam, I'm first of all of this community, so my opinions are my own and do not represent Croteam's views.
  Reply With Quote
Old 07-30-2013, 04:41 PM   #5   Add To Ignore List  
Kleer
 
xanaThaR's Avatar
 
Joined: May 2011
 
xanaThaR is offline
Default Re: What's wrong with this code?

I just tested it and it works fine. Did you forget about the second part of your 'any' filter - delay(5)?
If you want the script do what you describe just remove it:

Code:
Wait (Delay (5))

while not worldInfo:IsWarmupFinished() do
  Wait(Delay(0.1))
end

Walker_Blue:SpawnMaintainGroup()

RunHandled(
  function()
    WaitForever()
  end,  

OnEvery (Times(8, Event(Walker_Blue.OneKilled))),
  function()
   Walker_Red:SpawnGroup()
  end  
)
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hotline Miami 2: Wrong Number Mongo Game Talk 0 07-02-2013 01:35 AM
Workshop size limit still 100 mb and workshop error code 16 Finzy Serious Sam HD 8 12-21-2012 03:11 AM
Enemy sound SFX 180 wrong. anCOOL Serious Sam 3 4 12-06-2011 06:40 PM
Game using wrong GPU on a dual graphics system? Finzy Serious Sam 3 7 12-05-2011 06:59 AM
Detector Area Macro Code KingRaul Serious Sam HD 15 09-04-2011 01:04 PM


All times are GMT -4. The time now is 08:19 PM.