• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

I need some help :P

Status
Not open for further replies.
Level 5
Joined
Apr 11, 2011
Messages
107
is there any way to make the camera smoother when the unit turns?

why dont all the villagers "sleep" at night?

whats causing the random lag spikes i get, is it just me?

any help is appreciated :)
 

Attachments

  • RPG.w3x
    1 MB · Views: 60
If you want to make the camera smother, you can set the "Camera Smoothing Factor" to 1.

edit

You should also change it so that it sets the angle with a delay of 1 second instead of 0.3 (It looks much smoother like that)

Also, the "Sleeping" triggers are not working because they're being turned on after the unit has already entered the region, so the event isn't going to fire.
You can fix this by turning on those triggers and then moving the units to those regions.

The random lag spikes aren't actually lag spikes, they're just abnormal behaviors by the camera.
I think changing the duration of the angle setting from 0.3 seconds to 1 second will help. (As I said above)
There's really nothing that should or could cause lag spikes in that map.
 
Level 5
Joined
Apr 11, 2011
Messages
107
making it rotate over 1 second is a bit too slow but it did help increasing the time.

after fooling around with it more, i decided i would like to have the units placement in the viewing area more towards the bottom middle. When the camera would swing to face the units facing direction the viewing field would shift, is there a way to do this correctly?

the "sleep" trigger still isnt quite working correctly

the next thing i cant figure out is making a units animation play when another unit comes within range of it. ide like the undead units' birth animations to play when the "hero" unit's viewing range encompasses the undead unit. as in: im moving the "hero" around, i come across an undead skeleton crawling out of the ground.

thanks ahead of time :)
 

Attachments

  • RPG.w3x
    1 MB · Views: 90
the next thing i cant figure out is making a units animation play when another unit comes within range of it. ide like the undead units' birth animations to play when the "hero" unit's viewing range encompasses the undead unit. as in: im moving the "hero" around, i come across an undead skeleton crawling out of the ground.

You can use "Unit Comes in Range" events for the hero.
In a trigger with that event, check if the triggering unit is an undead unit.
If true, play the animation.

If you don't want the animations to play on the same units, you can implement Bribe's GUI UnitIndexer and save boolean into an array like this:

  • Set hasPlayedAnim[(Custom value of (Triggering unit))] = true
To sum up everything:
  • Trigger
    • Events
      • A unit comes in X range of U
    • Conditions
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempInt = (Custom value of TempUnit)
      • If (TempUnit is undead) and (hasPlayedAnim[TempInt] == false) Then
        • Play TempUnit's "birth" animation
        • Set hasPlayedAnim[TempInt] = true
      • Else
after fooling around with it more, i decided i would like to have the units placement in the viewing area more towards the bottom middle. When the camera would swing to face the units facing direction the viewing field would shift, is there a way to do this correctly?

You'd have to change the Angle Of Attack. (You can play around with it :p)

the "sleep" trigger still isnt quite working correctly

That trigger is trolling you.
 
Level 5
Joined
Apr 11, 2011
Messages
107
call me stupid, but im running circles trying to figure out the variables in that trigger. can you perahps toss one together in a test map and upload it for me? sorry for the idiocy. i learn better from example.
 
Level 7
Joined
Aug 31, 2011
Messages
125
  • Set TempUnit = (Triggering unit)
= Unit
  • Set TempInt = (Custom value of TempUnit)
= Integer
  • Set hasPlayedAnim[TempInt] = true
is... uhmm... i think its Boolean
----
call me stupid, but im running circles trying to figure out the variables in that trigger. can you perahps toss one together in a test map and upload it for me? sorry for the idiocy. i learn better from example.
No one should/will you call you stupid :p. Before, i was just as confused as you were, probably ALOT more lol. But once you get into triggering alot, it will seem kind of easy to understand what variables are what.
 
Level 5
Joined
Apr 11, 2011
Messages
107
the "Town Night" triggers STILL arent working, ive messed with them about a dozen time with no luck.

the play birth animation when unit comes into range trigger (from above) didnt work, i think ive got it all down correctly.

and why doesnt my dagger on/off trigger work; also, my only one weapon trigger?

map is uploaded below, sorry for my difficulties.
 

Attachments

  • RPG.w3x
    1.1 MB · Views: 46
Status
Not open for further replies.
Top