• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How can i put a dummy model to a fixed position on screen?

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
like hero icons also fixed in top-left corner, i want something similiar but on top-right corner or above the portait panel, any ideea how can i do it?
also could be nice a model (like blank icon model at inventory when dont have item there)

i tryed do it with bunny but still bad....

  • Untitled Trigger 002
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Lightning - Create a Chain Lightning - Primary lightning effect from source (Random point in (Playable map area)) to target (Center of (Playable map area))
      • Lightning - Change color of (Last created lightning effect) to (1.00 0.50 1.00) with 1.00 alpha
      • Set l = (Last created lightning effect)
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Unit - Create 1 Rabbit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set u = (Last created unit)
      • Unit - Add Crow Form to u
      • Unit - Remove Crow Form from u
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
local real x1 = GetCameraTargetPositionX()
local real y1 = GetCameraTargetPositionY()
local real z1 = GetCameraTargetPositionZ()
local real x2 = GetCameraEyePositionX()
local real y2 = GetCameraEyePositionY()
local real z2 = GetCameraEyePositionZ()
local real Zang = bj_RADTODEG * Atan2(z2 - z1, y2 - y1)
local real rotation = bj_RADTODEG * Atan2(y2 - y1, x2 - x1)
//call DisplayTextToForce( GetPlayersAll(), "X2: "+R2S(x2)+" - "+"Y2 "+R2S(y2)+" - "+"Z2: "+R2S(z2)+" - " )
//call DisplayTextToForce( GetPlayersAll(), "X1: "+R2S(x1)+" - "+"Y1: "+R2S(y1)+" - "+"Z1: "+R2S(z1))
call DisplayTextToForce( GetPlayersAll(), "Angle for user: "+R2S(Zang) + " rotation:"+R2S(rotation))
call SetUnitFlyHeight( udg_u, z2-100, 0.00 )
call SetUnitPosition(udg_u, x2, y2)
call SetUnitFacing(udg_u, rotation)
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 0.05 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
somwhere i watched a nearly workable example (only problem was if u moved the camera to close to ground and was cliff around u)

i planned something like this (i mean useing icons without wasteing space on map via trackables)

http://www.youtube.com/watch?v=APsU5j7ocYQ

just here the camera is fixed, but i want something like potion/bag bar maybe inventory.

(whatever if u check the video, that trackables unit icons are imported models or have a way how can i transform the unit/item icon to flat trackables?)
 
I believe you are thinking of something like this:
http://www.hiveworkshop.com/forums/...stem-2-3-a-192082/?prev=d=list&r=20&u=-Kobas-
I think that system is for single player only but you can understand the process from it.

It is possible to make it multiplayer, but you would need to understand how to use GetLocalPlayer() and other JASS things.

It is also possible to make a dummy object on the screen, but it requires somewhat complicated math. See this link for more information. (DGUI)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
I believe you are thinking of something like this:
http://www.hiveworkshop.com/forums/...stem-2-3-a-192082/?prev=d=list&r=20&u=-Kobas-
I think that system is for single player only but you can understand the process from it.

It is possible to make it multiplayer, but you would need to understand how to use GetLocalPlayer() and other JASS things.

It is also possible to make a dummy object on the screen, but it requires somewhat complicated math. See this link for more information. (DGUI)

ah that was the 1st thing about trackables what i tryed make on my demo map too but failed in positioning :D

whatever pls lets talk a bit about getlocalplayer thing:

its this work like this:

local string s = ""
if GetLocalPlayer() == GetTriggerPlayer() then
set s = "villager.mdl"
endif

create trackable with s path, but this also work same methode with floating text too?
i mean i set the string value between GetLocalPlayer tag dont make disconnection, right?

with the dgui things, i dont understanded it coz was with vjass, what is for me (idk why) hard to udnerstand :D
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
So my test map is not like the one you wanted ?

i wanted 2 thing.

1. is something like u do, but its got same problem than mine, if camera isnt fixed the target dont stay at that corner, also a flat icon what is allways do 90 grade with camera, the position not that important just must be fixed, indifferent it is right top or bottom left corner or bottom middle just allways fixed (like mostly the posted dgui thing in above post, just there also have problem with cliffs :/)

2. fixed menu like gui full screen inventory just mpi, so with getlocalplayer thing


Notice:
somebody can check this? http://www.hiveworkshop.com/forums/...stem-2-3-a-192082/?prev=d=list&r=20&u=-Kobas- coz i get white area in that selection menu and also missing the texts
 

Attachments

  • 121212.jpg
    121212.jpg
    121 KB · Views: 151
  • 1212121.jpg
    1212121.jpg
    122.1 KB · Views: 135
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
If you want a fullscreen MPI inventory then why not create a seperate place inside your map that is blocked during gameplay but will be panned by the camera when the player opens his inventory (in any way you want).

Then position a camera on the seperated place, create units with icon models that you can select (or use trackables) and use that as an inventory system or skilltree system or whatever?
In other words: If it's full screen, why does it need to be on a fixed position instead of absolute?

I know what you're trying to accomplish but it seems like a lot of work for something that could be done really simple :/
 
Level 11
Joined
Jun 15, 2011
Messages
447
I know what you're trying to accomplish but it seems like a lot of work for something that could be done really simple :/

I don't like your sarcasm, it's just too straight to the point! What's the intention of the :/ from the first place?

Anyway, back to topic... Why not just create custom icons/images? Use the cinematic filters?
Using models for that kinda thing'll just use some spaces of your map, I mean the terrain... But I hope someone would help you out with your problem...
 
using units/destructables directly will be much easier and will cost much much less file size... importing images for the icons to be used via fade filters will cost a bit too much file size because I don't think you can use the default icons as images for a fade filter...

also since each icon can have several positions, you will need an image for each of these positions and find a way to show the right image because you cannot set a fade filter's position on the screen... so if he has 10 inventory slots, then you also need 10 different images just for 1 item... so again, much much more file size will be eaten...

btw, the Ultimate GUI hero pick system works for MP as it's already MPI...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I know what you're trying to accomplish but it seems like a lot of work for something that could be done really simple :/

I don't like your sarcasm, it's just too straight to the point! What's the intention of the :/ from the first place?

Anyway, back to topic... Why not just create custom icons/images? Use the cinematic filters?
Using models for that kinda thing'll just use some spaces of your map, I mean the terrain... But I hope someone would help you out with your problem...

First off, please use QUOTE tags in order to show a quoted text.

Second off the intention of my smiley was to inform the user that there are better methods to achieve what he wants.

And third off the method I explained was better then what he initially wanted.
Adiktuz allready gave you an explenation on why that is.

I'm not trying to start a flamewar against you or anything, please realize that my response was intended to help the original thread poster.
No harm done.


karassu said:
Just giving him an idea, if he ever wants a map with nice appearance...

b.t.w. he could also create a simple small plane model with texture to make the background of the inventory and then use fixed positions.
This would be the same effect basically.
 
Level 11
Joined
Jun 15, 2011
Messages
447
First off, please use QUOTE tags in order to show a quoted text.

Happy now?

Second off the intention of my smiley was to inform the user that there are better methods to achieve what he wants.

That's the exact thing you did to me from my previous reply... That's how it feels... Remember the cough thingy?

Do you have problems with me or somethin'? Just tell me, you might wanna have a tea party with me some time.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Happy now?

yes :)

That's the exact thing you did to me from my previous reply... That's how it feels... Remember the cough thingy?

Not exactly, that was in a different context and coughing can really be seen as sarcasm my friend... It's a common missconception over the internet.

Do you have problems with me or somethin'? Just tell me, you might wanna have a tea party with me some time.

Not at all! I'm not trying to invoke you. In fact, I'm actually quite a nice person if you get to know me :)
I'd be delighted to join your tea party good sir.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
either make the inventory area into a fixed area in the map or use DGUI... but I would suggest the first one because DGUI is something that requires lots of patience and knowledge to utilize...

@karassu - because you don't have click events for cinematic filters...

y, u have right, dgui maybe too hard and also sometimes dont work well, so need only for potion bar / quick skill bar but idk if it is worth the effort anyway i tryed the fixed equipment system, but idk if it is cause desync :D

main ideea:

-all player use same map area/camera/dummy attaching unit (a villager with locust and setted pitch angle) and destructibles
-the area is like a normal area, covered with tree, barrels etc
-when player type "test" then hide tree/barrels and show the window part destructibles and set non transparent the attaching villager
- when player click to unit who is above the exit icon then set transparent locally the villager, locally hide the window parts and show the old destructibles

but idk if this cause desync or no :D

(whatever i guess i must replace the clickable unit to trackables else its show the hpbar of the dummy icon unit)


@Adiktuz
btw, the Ultimate GUI hero pick system works for MP as it's already MPI...

somehow for me look enough weird (yeah, long ago i tryed it and worked well but in last days i downloaded more time and allways same problem) - problem was the white area (huge white squares) and missing texts also i try hide the interface and let it look like a normal area on map
 

Attachments

  • WindowTrying.w3x
    31.1 KB · Views: 65
Level 14
Joined
Apr 20, 2009
Messages
1,543
(whatever i guess i must replace the clickable unit to trackables else its show the hpbar of the dummy icon unit)

Set the selection size to a negative value and the hpbar is gone. (Shift + click in object editor field) But I guess you knew that ;)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Set the selection size to a negative value and the hpbar is gone. (Shift + click in object editor field) But I guess you knew that ;)

i forget that, but even that i really dont know what could be the best, i tell u why:
1. the unit selection is really easy but cant make similiar nice tooltips when cursor above the items
2. trackable cool but need create every equipable item 12x what after lets say 20 item is 240 trackable and it is only if have 20 item and need triggers for detect the player etc......... :/

(i cant give rep coz u gived already or idk why :/)

try the map because u can see how i meant the hideing the window inferface
 
Me and Mag is thinking of how to make this kinds of trackables,where the destructables and units are moved on the camera position.

We are just finding out how to create a board.

This thing is possible.

I suggest put a dummy unit.Save its distance to a center x(ex.Create a dummy or the center of a region).Save its radian or angle whatsoever.Then activate the loop by moving the unit to the camera x and y and applying the distance and radian
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
why would you need 12x for each item when using trackables?

every player need his own trackable because u cant detect who clicked the trackable but u can hide/show trackable (with model ="" or valid model path when u create it) so trackable[1] = what locally only player 1 can see etc, if u click the trackable[1] mean u are player 1 since only player 1 able to click to trackable[1]

I suggest put a dummy unit.Save its distance to a center x(ex.Create a dummy or the center of a region).Save its radian or angle whatsoever.Then activate the loop by moving the unit to the camera x and y and applying the distance and radian

u can try to show me this? in math/or trigger coz i cant image it how u do it when camera pitch angle/rotation is changed


(another question exclude lock camera to a unit, i can lock to a coordinate where player not able to change the camera distance/roll/angle etc so camera cant be changed with keyboard)
 
I misunderstood the count... I was thinking about OE count, I forgot that trackables are not on the OE... :)

I think it's hard to do when you can adjust the camera pitch in-game because you'd need to rotate the unit's pitch too... coz I don't think there's a function for pitch adjustment... for angle rotation then it's a lot easier...

Well, you can create an invisible dummy in that area and lock the camera to that dummy...
 
That is something that Tukki made specifically for that map, based on DGUI (I think it's just based on DGUI's idea, and not a direct usage of the system)... I think there were some special dummy models used in DGUI... if you really want how he did it, ask Tukki himself, though I doubt that you'll get much info... but you'd probably get the idea of how to do it... but the thing is, it was a pretty advanced system [this system is probably far harder to do than Anachrons FSI and let me tell you that it took us a while to implement Anachron's FSI on the earlier days of SoE], and if he hasn't changed, that system was probably written in zinc...

and please don't multipost... :)

btw, if you're gonna employ a locked target camera then also reset the pitch/angle every 0.xx seconds, you don't need to worry about the pitch then since the player won't be able to change camera pitch...
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
That is something that Tukki made specifically for that map, based on DGUI (I think it's just based on DGUI's idea, and not a direct usage of the system)... I think there were some special dummy models used in DGUI... if you really want how he did it, ask Tukki himself, though I doubt that you'll get much info... but you'd probably get the idea of how to do it... but the thing is, it was a pretty advanced system [this system is probably far harder to do than Anachrons FSI and let me tell you that it took us a while to implement Anachron's FSI on the earlier days of SoE], and if he hasn't changed, that system was probably written in zinc...

and please don't multipost... :)

btw, if you're gonna employ a locked target camera then also reset the pitch/angle every 0.xx seconds, you don't need to worry about the pitch then since the player won't be able to change camera pitch...

i tryed avoid the periodic triggers :/ whatever for me vjass also hard so dont even think about zinc and other things :D
 
Level 17
Joined
Jul 17, 2011
Messages
1,863
112891d1334147624-orpg-shadows-everwood-infoandbackpack01.png



the visual for this ( the gray part where the text is, the human ai borders) is probably done with a fade filter, if not then a fade filter would be the best solution,

everything else is based on the current camera target of the player the floating text is located by a point with offset function the point being the target of current camera view the inventory is a bit more complicated but most likely its done with units
by getting the camera target for the local player its easy to do this but this is no sane way of making a system like this
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
icons are images too :D
Also Mag said,you need to have a tons of math equations to do this
Shadows of Everwood windows freezes camera.
Mag used to work with them.
this dgui thing worked for multiplayer map or just for singleplayer?

here also a bag system
http://www.wc3c.net/showthread.php?t=104931&page=3
http://www.wc3c.net/attachment.php?attachmentid=41156&d=1236790637


basically how to freeze the camera? make periodic trigger what lock the roll/rotation/distance etc?

@about math, i really dont understanded it, or any dgui thing, coz of the struct things, it is damn confusable, basically the whole math library with struct+vetor or matrix or what :D

at projectiles was dummy with 180 animation, each animation shift the dummy unit pitch and with it the attachment too, so with this trick+setunitfaceing wasnt hard to make a realistic arrow projectile, but there u calculated everything related with curve, here most calculate with camera and if camera isnt 270 grade with ground (|) then idk how to calculate the distance :/
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
Possible, yes... every thing in vJASS is turned into jass by the compiler anyway...

but I don't think it is practical to do it that way...

but whoknows, Maggy might even be able to make it in GUI form (with a lot of custom script lines)...

that could be awasome because have bag systems or dgui things in vjass, but no one in jass or gui :/
 
Status
Not open for further replies.
Top