Nizar Haddad
9 years ago

Hi all, i'm editing a 4 players cXn map, and I've been working on it for 3 days yet (i'm using Shockwave v1.1 World Builder, by the way, for this).

Now in this map, I've created a Minefield (a lot of EMP mines) in the middle of the map, in order to prevent quick rushes. But after testing the map online, it was so annoying, the mines prevented each team to attack the other freely. So now i'm trying to make these mines detonate normally after 2.5 minutes of playing (150 secs) using Scripts, and i tried almost everything to do this but it didn't work, and so i need your help to work it out..

i won't mention my trials until you guys give me ideas.. in order to hear exactly what was your first brilliant working one

With Thanks!
Sponsor
acidbrain
9 years ago
Mines are triggered by enemies and neutral units, you could make an invisible object that follows a waypoint path directly over the mines so they explode, you could make an area around the minefield and use a script to check if there are still mines in the area...
IF player whatever has greater than 0 units of type MINE in area minefield then spawn invisible unit and invisible unit follows waypoint path mine destruction path or whatever. you can keep executing this until there are 0 mines in the area...

Good luck
Panem et kirkinses
klingondragon
9 years ago
Can you not just add the mines to a team (or second civilian player) and have a script to destroy that team (or player) after 150 seconds?
acidbrain
9 years ago

Can you not just add the mines to a team (or second civilian player) and have a script to destroy that team (or player) after 150 seconds?

Originally Posted by: klingondragon 



There are multiple ways to do it mr. dragon, I used invisible manholecovers once to spawn in minefields, made a map.ini to attach the minefield behavior module, deleted the manholecovers afterwards...

Panem et kirkinses
klingondragon
9 years ago
I just offered a potential solution. There's no need for the sarc.

And it's Mx Dragon, not Mr.
acidbrain
9 years ago

I just offered a potential solution. There's no need for the sarc.

And it's Mx Dragon, not Mr.

Originally Posted by: klingondragon 



Im sorry mr. Klingon ups...Mx Klingon...was in a troll mood so i trolled a bit...:P


Panem et kirkinses
Nizar Haddad
9 years ago
well, i tried to do this (make a team and then kill this team using Scripts), but unfortunately it didn't work, neither the kill function nor the delete function.

and then i tried to name all the mines with the same name as : "EMP Mine", and then in Scripts i used the (kill unit) function, but it only detonated 1 mine between them all (about 360 mines).

after that i tried to make a new ability in the map.ini, which is a Special Power to drop a special bomb which clears mines from an area. Unfortunately, for somehow reasons, it didn't work with me, and the map didn't work when i tested it, and so i went to read the ReleaseCrashInfo file, and it said there was a problem parsing the line related to the Plane which is used to drop the bomb (the plane is a copy for the B3 Jet code, the MOAB dropper, with changes).

not to mention that after all these fail trials, and especially after the map.ini fail, a new problem occurred which is about not displaying the map name in the game! So instead of the name : (cXn 2v2 - NOH edition [SHW]), it appeared this way : (MISSING : 'cXn') 😠 😞 😠

i mean wtf.. does this need a miracle to work properly!
klingondragon
9 years ago
You tried deleting the team, have you tried destroying a player?
acidbrain
9 years ago
Like I said...Make an invisible enemy or neutral unit that follows a waypointpath over the minefield, give the unit an armor which is resistant to mines and a high speed, make an area around the minefield and check if there are mines with a script, if there are no mines left delete the spawned minesweep unit and voila...
If im not mistaking mines are not removed from the map if the creator dies, the mines only stop regenerating...*Edit Or maybe the mines do die...Play around with this line
DegenPercentPerSecondAfterCreatorDies = 3.33%  ; take about 30 seconds to die.
Here is the code:

; this is the "standard" mine used for building upgrades
Object ChinaStandardMine

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    ; NOTE: ParticleSysBone doesn't work correctly with DefaultConditionState!
    ; fix someday! (srj)
    ConditionState = NONE
      Model           = EXAMineGroup
      ParticleSysBone = Mine01 MineFX
      ParticleSysBone = Mine02 MineFX
      ParticleSysBone = Mine03 MineFX
      ParticleSysBone = Mine04 MineFX
      ParticleSysBone = Mine05 MineFX
      ParticleSysBone = Mine06 MineFX
      ParticleSysBone = Mine07 MineFX
      ParticleSysBone = Mine08 MineFX
    End
    ConditionState = RUBBLE
      Model = None
    End
  End

  ; ***DESIGN parameters ***
  DisplayName       = OBJECT:StructureMine
  EditorSorting     = MISC_MAN_MADE
  KindOf            = STICK_TO_TERRAIN_SLOPE IMMOBILE MINE NO_HEAL_ICON
  ArmorSet
    Conditions      = None
    Armor           = MineArmor
    DamageFX        = None
  End

  ; *** ENGINEERING Parameters ***  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End
  
  Behavior = StealthUpdate ModuleTag_03
    StealthDelay                = 0 ; msec
    StealthForbiddenConditions  = NONE
    FriendlyOpacityMin          = 0.0%
    FriendlyOpacityMax          = 0.0%
    InnateStealth               = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = No
  End

  ; this is a misleading name, since it's really single-Mine Behavior...
  Behavior = MinefieldBehavior     ModuleTag_04
    DetonationWeapon            = StructureMineWeapon        ; what happens when we detonate
    DetonatedBy                 = ENEMIES NEUTRAL
    ; we no longer want the "scoot" behavior. it looks funky with current art. (srj)
    ;ScootFromStartingPointTime  = 500
    RepeatDetonateMoveThresh    = 5.0
    NumVirtualMines             = 8
    Regenerates                 = Yes            ; Standard mines DO regenerate.
    StopsRegenAfterCreatorDies  = Yes
    DegenPercentPerSecondAfterCreatorDies = 3.33%  ; take about 30 seconds to die.
  End

  ; Standard mines DO heal.
  Behavior = AutoHealBehavior ModuleTag_05
    StartsActive      = Yes
    HealingAmount     = 2
    HealingDelay      = 5000 ; msec
    StartHealingDelay = 15000 ; wait this long after we are damaged to start healing
  End

  Geometry            = CYLINDER
  GeometryMajorRadius = 30.0
  GeometryHeight      = 1.0
  GeometryIsSmall     = No
  
End

About that map name problem...watch this vid...You have to remove the map name in ´edit map settings´...




Greetz
Panem et kirkinses
klingondragon
9 years ago
how can you make sure the minesweep takes out all the mines?
How do you stop them regenerating (that one probably is my delete the player solution)
Why not just change the mines so they automatically die after a set time? Instead of trying to sort out some sort of improvised minesweep.
acidbrain
9 years ago

how can you make sure the minesweep takes out all the mines?
How do you stop them regenerating (that one probably is my delete the player solution)
Why not just change the mines so they automatically die after a set time? Instead of trying to sort out some sort of improvised minesweep.

Originally Posted by: klingondragon 



If you spawn units with the minefield behavior and then kill those units the mines stop regenerating, if you make an invisible enemy or neutral unit that goes over the mines they will detonate...
I used minefields in a mission I made a while ago, when I come home 2nite I will try to find the code...

*Edit
I think that if you edit this line
DegenPercentPerSecondAfterCreatorDies = 3.33%  ; take about 30 seconds to die.
the mines will die, if im not mistaking this line of code takes 3,33% of the health each second so if you spawn units with the minefield and kill those units after 120 seconds the mines will be gone after 150 seconds
Panem et kirkinses
Nizar Haddad
9 years ago

You tried deleting the team, have you tried destroying a player?

Originally Posted by: klingondragon 



yes i tried both, but nothing worked. maybe i did something wrong so please could you try it for me yourself.. 👍
Nizar Haddad
9 years ago

If im not mistaking mines are not removed from the map if the creator dies, the mines only stop regenerating...

Originally Posted by: acidbrain 



Mines don't die immediately after the creator dies, true, but the creator is the building not the player. meanwhile if the player dies, all the mines will detonate at once.


And thank you very much for the video, it worked with me and now i understand why.. after analyzing what happened. 😁 👍
jman
  • jman
  • 50.25% (Neutral)
  • Private
9 years ago
The topic is in the wrong section of the forum.Please move it to the right one.
acidbrain
9 years ago

The topic is in the wrong section of the forum.Please move it to the right one.

Originally Posted by: jman 



Good point...:P


Panem et kirkinses
UTD^Force
9 years ago
It's here now 😉
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
Nizar Haddad
9 years ago
well, now it is in the right location 😁 and i'm surprised that it's been marked as a Hot Topic 😄

now about the minefield, i decided to launch 8 big missiles (called in Shockwave 1.1 : Tungsten Rods, SupW) inside the minefield to clear it completely with warnings in different times for the players to prepare themselves and then to leave the middle. and the idea worked properly and i'm satisfied with it, so now the minefield case is closed.

However, we still have other problems, like first, when striking with these big missiles, i want the minefield area to be shown to everyone playing the map, and so i used the (Reveal Map at Waypoint Permanently) function/script, and then followed with the (Undo Permanent Reveal). but this idea didn't work at all with me.

And another problem is the doubling of the Timers, in other words, when I initiate a new Timer in the game for a specific purpose, the GameEngine creates double Timers of the same name and time and everything, instead of only 1 instance as it is normally supposed to happen.
Nizar Haddad
9 years ago
Hello?!! anyone still alive here..