Page 1 of 1

Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 9:45 am
by samtre
Ok, I guess i was long gone from this place for a long time.... suddenly I got bored and started working on maps again.
When I ran through a couple of them and the best maps used the suckish projectile system i invented. I went for a nap and woke up having a strange weird thing going on my head about collisions and stuff.... So i went on created a better projectile system, with the following included:
- projectile collision (projectiles will collide with each other)
- much more compact (i guess)
- moving/non-moving projectiles collision
- all made in GUI (as usual i still suck at JASS)

all this took me 4 hours....
here's a demo map, I don't feel like posting the original here yet cause i need to fix more stuff but I could give if you'd ask.

p.s. my old projectile system map crashed along with my latest Slide&Die (October 2010) map for still unknown reasons

[A] hotkey for casting projectiles, [Z] for creating a shield barrier, [X] for placing walls.

damage was not implemented as im kinda feeling lazy.....

Changelog:
Spoiler:
v1.0
- added 3 new elements (frost, lightning, earth)
non protected version is v1.01, you can take a look at it and tell me whatever I can improve on.

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:01 am
by 3ICE
Yep, you could protect it better. Tutorial: http://3ice.hu/blog/protect-warcraft-maps/

All your trigger names and variables are exposed in the map script:

Code: Select all

integer array projectile_ability
integer array projectile_ability_nomove
integer array projectile_type
integer array projectile_type_nomove
integer temp_ability_cast
point array ppoint
point temppoint_groupcreate
point temppoint_target
point temppoint_unit
real array projectile_damage
real array projectile_modifier_damage
real array projectile_modifier_speed
real expirationtimer_standard
real projectile_maxreach
real projectile_range_hit
real temp_angle
region array temp_Region
unit array projectile_temp
unit array P_Hero
unitgroup array projectile_group

triggers:
Melee_Initialization
projectile
projectile_group_kickunit
projectile_target_check
projectile_targetGroup_check
projectile_create_STANDARD
projectile_movement_with_move_collision
projectile_create_STANDARD_nomove
projectile_move_with_nomove_collision 
The reason why some maps stopped working is patch 1.24, where Blizzard removed some trigger functions.

EDIT: Another person had this problem, he claimed that the optimizer broke their warcraft. I have no idea how that is possible and he didn't share any details beyond "Help I can't open warcraft!"...

EDIT2: The map refuses to open...

EDIT3: Never mind, it was just the long name. Works fine after I renamed it to "ps.w3x".

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:03 am
by samtre
i used VexOp 4.9 to protect it then suddenly after posting this I can't find the map in WC3

i think this happened to most of my maps

EDIT:
COOL!!!! renaming it short actually does work...... (wth-ing inside)

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:09 am
by 3ICE
Maybe you had the same issue as me? (Too long name) EDIT: This is a well-known issue I have documented many times over the years.

The fire projectiles don't seem to be colliding properly when fired at an angle to each other.

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:11 am
by samtre
I placed the radius for collision to 75 (real), maybe I should set it to 50?

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:12 am
by 3ICE
If you lower that radius it will be even less likely that projectiles collide.

EDIT: Fire projectile collides with fire shield, but not with electricity barrier. (Tooltip says it blocks "all" projectiles.)

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:14 am
by samtre
it actually collides with each other, the player color just have to be different.
friendly fire is bad..... use red to shoot a projectile at a blue and the blue to shoot the red, let the projectiles collide with each other.
shields do not collide with each other.... sadly im having a headache

EDIT: testsubject actually meant testsubject, I don't expect the shield to have a different model, the shield is based on the projectile system, just with the projectiles not moving. so the shield isn't a projectile, just based as one.

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:17 am
by 3ICE
Oh. Didn't think about that. I do like my friendly fire. Or at least eating friendly bullets.

And the fire colliding works fine now, I probably timed it wrong the first time.
TheyCollideNow.jpg
TheyCollideNow.jpg (90.35 KiB) Viewed 18234 times

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:19 am
by samtre
you edited that pic? oO
and is that half of a chicken being killed?

Re: Spontaneous renewed creation of Projectile System

Posted: Sat Mar 05, 2011 10:22 am
by 3ICE
No, I just took a screenshot and removed the UI.
I have 300 APM, like the pros. Thats how I can shoot projectiles so fast.

And those are just flags. No chicken was harmed during the making of that picture. :)

EDIT: Added "I do like my friendly fire. Or at least eating friendly bullets." to a post above.