Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: np
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2011-07-24 20:15        
     
First of all, hi all I'm a newbie on this forum but have been scripting/editing for my own leisure since OFP and thought I'd get into it again.

I have a script that uses screenToWorld to get a position on the ground and instead of creating an object I want to use the ground position feed it back through worldToScreen and draw an icon/rectangle or something in the hud.

I already tried with creating a Dialog in the description.ext, but I'm afraid that isn't working properly. Any pointers on how to get this done?

Thanks in advance.

P.S.: I have searched extensively, but haven't found anything useful.


Author Message

Pirin  



Posts: 1548
Rank:


Level: Member PFS

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 40
In-game name: kylania

 
#2 Posted at 2011-07-24 22:41        
     
Can you mock up a picture of what you're talking about, I'm not understanding what you mean by "icon/rectangle or something in the hud".


Advertisement


Author Message


Posts: 4
Rank:


Level: Member

Country: np
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2011-07-24 22:54        
     
Pirin, thanks for the reply.

I'm sorry for being vague. What I want is to be able to draw an icon (e.g. the diamond shown on your squad members) in the player's hud, based on a position on the ground.

I want to be able to communicate Points of Interest in Coop/MP without using the map, without interfering with tasks and independently of being a member of a squad.

E.g.: Player1 spots a POI, looks at it, calls it in via radio/addaction. Player2 gets a hint and sees an icon in his hud showing the direction/location of the POI (perhaps labelled for type).

I have tried creating a dialog, but I can't seem to make it dynamic and have it show without halting player movement.

Hope this makes it a bit clearer, I'm unfortunately not a native English speaker.


Author Message

Pirin  



Posts: 1548
Rank:


Level: Member PFS

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 40
In-game name: kylania

 
#4 Posted at 2011-07-24 23:29        
     
Easiest method would be tasks + cursorTarget (or screenToWorld).


Author Message


Posts: 4
Rank:


Level: Member

Country: np
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2011-07-24 23:33        
     
# Pirin : Easiest method would be tasks + cursorTarget (or screenToWorld).

Ah yeah, I did that but I was looking for a method that wouldn't interfere with the actual mission tasks.

I wish I could just duplicate the squad diamonds and apply it to any position or object I'd like. If I come up with some other solution I will report, I reckon it will be useful for others.


Author Message

Pirin  



Posts: 1548
Rank:


Level: Member PFS

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 40
In-game name: kylania

 
#6 Posted at 2011-07-25 00:52        
     
Ya know, limiting it to a single task called POI or something might be a good plan. You'd limit it so that you only had one extra task, and you could even like set it, show it active for 30 seconds or so then switch back to whatever task the player had before. Shouldn't be too intrusive that way and the player could go back to it whenever they needed to.






Tags: Draw, Hud, Icon