HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

SuckAllSurroundingModelsAndActAllWeirdAndShit v1.0

06-23-2009, 02:49 AM#1
Silvenon
SuckAllSurroundingModelsAndActAllWeirdAndShit v1.0
By: Silvenon



I thought I should make a function, something to contribute to this site. I want opinions from you guys before I submit it to the resources.

I made a documentation so everything should be pretty much clear.

Collapse JASS:
library SuckAllSurroundingModelsAndActAllWeirdAndShit initializer Init
//***********************************************************************
//* SuckAllSurroundingModelsAndActAllWeirdAndShit v1.0
//* ----------------------------------------------------
//*  INFORMATION:
//*  ------------
//* 
//*       By: Silvenon
//*       Requirements: NONE
//* 
//*  SuckAllSurroundingModelsAndActAllWeirdAndShit is a perfect
//*  function if you want all the models surrounding the given point
//*  to be sucked for no apparent reason either for a short period
//*  of time or permanent.
//* 
//*  IMPLEMENTATION:
//*  ---------------
//* 
//*  Simply create a new trigger, convert it to custom text, delete
//*  everything there and paste this code inside.
//*
//*  AVAILABLE FUNCTIONS:
//*  --------------------
//*
//*  function SuckAllSurroundingModelsAndActAllWeirdAndShit takes real x, real y, boolean permanent returns nothing
//*
//*  PARAMETERS:
//*  -----------
//*
//*  x = x coordinate of the sucking point
//*  y = y coordinate of the sucking point
//*  permanent = if true, the models will be sucked permanently
//*
//*  LAST WORDS:
//*  -----------
//*
//*  If for some reason models don't get sucked in, you can increase the
//*  SFX_COUNT constant, but that's not very likely to happen, so no worries.
//*
//*  It currently works only with the thunder clap effect, so I don't
//*  suggest changing the SFX_PATH constant unless you know what you're
//*  doing. I tested a few other effects, but it doesn't appear to work,
//*  at least with with the current SFX_COUNT, maybe it works with a
//*  greater value.
//*
//*  Credit me if you use it in your map!
//*
//***********************************************************************

// --------- //
// CONSTANTS //
// --------- //

globals
    private constant integer SFX_COUNT = 800
    private constant string SFX_PATH = "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
endglobals

// --------- //
// FUNCTIONS //
// --------- //

function SuckAllSurroundingModelsAndActAllWeirdAndShit takes real x, real y, boolean permanent returns nothing
    local integer i = 0
    if permanent then
        loop
            exitwhen i == SFX_COUNT
            call AddSpecialEffect(SFX_PATH, x, y)
            set i = i + 1
        endloop
    else
        loop
            exitwhen i == SFX_COUNT
            call DestroyEffect(AddSpecialEffect(SFX_PATH, x, y))
            set i = i + 1
        endloop
    endif
endfunction
private function Init takes nothing returns nothing
    call Preload(SFX_PATH)
endfunction
endlibrary

I provided a screenshot too. The thing on the left is a mixture of trees and a resurrection stone. This could add a whole new dimension to modelling!

Click image for larger version

Name:	WC3ScrnShot_062309_040031_01.jpg
Views:	128
Size:	357.8 KB
ID:	43925
Attached Images
File type: jpgWC3ScrnShot_062309_040031_01.jpg (357.8 KB)
06-23-2009, 01:59 PM#2
Hans_Maulwurf
wad? this is just a function that creates 800 thunder clap special effects?
06-23-2009, 02:29 PM#3
moyack
April fools was long ago...
06-23-2009, 02:30 PM#4
Deaod
wtf? WC3 sure is strange.
06-23-2009, 08:40 PM#5
darkwulfv
Brilliant! I found a use for this as soon as I looked at it.
06-23-2009, 08:53 PM#6
grim001
map for anyone who wants to test this but is too lazy:
06-23-2009, 08:55 PM#7
Rising_Dusk
This is fawesome.
06-23-2009, 08:56 PM#8
HINDYhat
This should be approved, with a 1st place award icon and a news announcement on the first page.
06-23-2009, 09:09 PM#9
Anitarf
Wait, is this like a serious new bug that was discovered or just a lame attempt at a joke? I'm too sleep deprived to be able to tell the difference.
06-23-2009, 09:26 PM#10
Rising_Dusk
It actually works. :p
06-23-2009, 09:31 PM#11
Captain Griffen
Lol...just...lol...
06-23-2009, 09:31 PM#12
Silvenon
Quote:
April fools was long ago...

Quote:
Originally Posted by Anitarf
Wait, is this like a serious new bug that was discovered or just a lame attempt at a joke? I'm too sleep deprived to be able to tell the difference.

It's real (the screenshot is real too).

I also found that the limit is about 712, but that last just for a second or so. I'll test it for other special effects too.
06-23-2009, 09:39 PM#13
Troll-Brain
The game freez, and ? ...
06-23-2009, 09:49 PM#14
akolyt0r
works for me
06-23-2009, 09:56 PM#15
Silvenon
Yeah, first time it creates a massive lag, but the next time the lag is smaller.

If the game freezes for you, set SFX_COUNT to around 5, set "permanent" to true, make the function execute on "cinematic skipped", test map and press ESC couple of times in a row. The radius of sucking is much lower that way, though.