fodev.net
FOnline Development => Share Your Work => Topic started by: adumbperson on July 17, 2016, 02:33:14 pm
-
Hello, I have made another module using methods from vault112 to show some critter info over the mouse and onhead.
vault112 were using loop() dangerously as FODE and maybe others.
I think the best place for that kind of need, is to attach a callback to some gui interface methods from the *screen* you want to work in...
but be aware that it's called a lot.
For mousemove it throws the function each times you moves your mouse on the right active screen.
For Draw func it throws the function all the times the screen is active!
https://gist.github.com/anonymous/bd7682b2fb6346f64821309a4c097884 (https://gist.github.com/anonymous/bd7682b2fb6346f64821309a4c097884)
Used cpp extension for syntax colors.
If you have Questions or critics, don't hesitate.
-
Let's call this one v2 : https://gist.github.com/anonymous/f9cf38cdc5baf5d144daaea3c52c839c
It's now comparing critters array for changes... and update in case there is changes.
ouppps forgot that too into client_main.fos
void critter_in( CritterCl& cr )
{
if (cr.IsNpc())
cr.NameOnHead = "";
}
CompareCritters() is wrong... you must rework dis yourself!
without using it I keep same perf than when I don't use the module at all, so it looks pointless to use CompareCritters() to me....
-
::)
Well I knew from beginning it wasn't the right way to proceed. Then shared some code here to talk about it...
While that time I reworked all of this with the Wipe's helps to end with it done a better way.
https://gist.github.com/anonymous/be154008845580219982adc33db9279a (https://gist.github.com/anonymous/be154008845580219982adc33db9279a)
;D
-
this commit => "My hands writes code" ;D
https://gist.github.com/anonymous/070135a16749a21b70994cb5148e99cf (https://gist.github.com/anonymous/070135a16749a21b70994cb5148e99cf)
-
This commit => "The Last Iteration." 8)
I'm finally happy with that. It works very well!
Let's talk a bit from the module :
- Show/hide Player name on heads
- Show/hide Npc name on heads.
- Show/hide player and npc health info in a way your opponents sees if you feel good or wounded... not your amount of HealthPoints....
- Automatic critter information over mouse cursor. Awarness let you see the weapon and armor (in futur I want this to Show bonuses from weapon & armor by coloring the output.)
https://gist.github.com/anonymous/fe2dbba76fc0e35f3ad63370a22c9c8b (https://gist.github.com/anonymous/fe2dbba76fc0e35f3ad63370a22c9c8b)
-
Hey, I checked repo, why did you name script files cpp extension? Aren't those .fos files?
-
Hey, I checked repo, why did you name script files cpp extension? Aren't those .fos files?
Hey Slowhand, I did use cpp because github doesn't have AngelScript syntax color...