HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

MaDScene system

02-10-2008, 03:17 PM#1
MaD[Lion]
Open source demo of my timing system.

Features:
-"Wait" with 2 decimal exaction
-Can use wait inside LOOP and/or IF/ELSE blocks

How it works:
-There is a periodic trigger tat runs scenes every 0.01 seconds. Scenes are declared using textmacro. Inside this scene you can use texmacro version of LOOP/EXITWHEN/ENDLOOP, Wait, IF/ELSE/ENDIF. Normal wait/polledwait can be used here but it is not exact and buggy.
Wait textmacros cannot be used within normal loop and if blocks, thats why there are custom LOOP and IF blocks.

Anyway this system makes it easy to make things happen in high frequency, example you can now do a loop with small delay to change color/size of a unit over time, or do anything u want really fast.
Cons:
-Limitted local use, locals will be reset (to their declared values) everytime there is a Wait or a LOOP textmacro used.
-By using textmacros wrongly (example forgot to close loop, or if blocks), will not show syntax error, but will bug in game. These things will not happen if you follow the correct syntax and logic of normal jass.
-LOOP textmacro is limitted to 20 levels nesting (which i hope no one get this high). And because of this, there can only be 409 (8190/20) Scenes running at the same time (which is very unlikely to happen).

Pros:
-Each scene is linked to a struct that you define, this means you can link scenes to anything you like. Example to other systems.
-Can easily and quickly make a timing for events.
-Does not require any H2I or I2H functions
Attached Files
File type: w3xMaDScene.w3x (34.8 KB)
02-10-2008, 05:02 PM#2
Vexorian
Quote:
Cons:
-Each scene is linked to a struct that you define, this means you can link scenes to anything you like. Example to other systems.
This is a con?
02-10-2008, 06:08 PM#3
Alevice
Considerably good, perhaps?
02-10-2008, 06:37 PM#4
MaD[Lion]
well vex, state ur reasons pls :D i think its a cons... cus tats something im most proud of in the system.

edit: oh damn i though Cons means bad XD