TACO

3 years 10 months ago #13 by Stern
Replied by Stern on topic In-game camera position display.
On Error Resume Next - This is cheating !...but it helps :)
I used it all the time.

You created exe file from vbscript ?
VbsEdit is a program that can do that a i remember.

Also there was a add-on that allowed to create custom GUI for vbscript.
Dont remember the name.
I used it to create some custom calculators for electronics.
Something like series resistor for LED and many more useful calculations.
(But its easy to use Supply Voltage x 100, for one LED it gives easy value to start with)
Then maybe 2016 I started to learn Pascal, used in Delphi.

The one who hesitates is lost !

Please Log in or Create an account to join the conversation.

3 years 10 months ago - 3 years 10 months ago #14 by ProSabre
Replied by ProSabre on topic In-game camera position display.
You created exe file from vbscript ? Vbsedit stern.

Forgot, i should use this below.
https://www.f2ko.de/programme/vbs-to-exe/

You might of been my teacher at school stem lol.

I was showed pascal coding and to program the use of a robot arm.
So long now ago. I wouldn't remember the coding.

I was only one in the class room to learn, we had 3 computer rooms empty.
Every one, wasn't interested in computers.

Crazy days now, its the way of life now.

Did one more for you.
log output, bell alert, temp msg boxes - that will time out.
more error alerting ect..

Can use parts of my code for any think you like too.

option explicit
On Error Resume Next
Dim objShell, VObj
'make speak obj
Set VObj = CreateObject("SAPI.SpVoice")
with VObj
Set .voice = .getvoices.item(0)
.Volume = 70
.Rate = 0
VObj.Speak "word pad"
end with
'CreateObject and cmd routines
Set objShell = CreateObject("WScript.Shell")
objShell.Run "Cmd /C CD &"&_
"&Echo /...>>log.txt&Echo %COMPUTERNAME% by %USERNAME% on %DATE% at %TIME%>>log.txt"&_
"&Echo /...>>log.txt&Echo [WordPad] : Application : Run Successfully :>>log.txt"&_
"&echo CreateObject(""WScript.Shell"").Popup ""Hello and welcome to Word pad"", 3, ""Terminate in 3 seconds"">>%temp%\temp.vbs"&_
"&cscript %temp%\temp.vbs>Nul"&_
"&Del /Q ""%temp%\temp.vbs"""&_
"&Start /b wordpad.exe"&_
"&Timeout /T 1 /NOBREAK >nul"&_
"&Echo bell"&_
"&Timeout /T 1 /NOBREAK >Nul"&_
"&echo CreateObject(""WScript.Shell"").Popup ""Thank you! For using Wordpad"", 5, ""Terminate in 5 seconds"">>%temp%\temp.vbs"&_
"&cscript %temp%\temp.vbs>Nul"&_
"&Del /Q ""%temp%\temp.vbs"""&_
"&Exit /b",0,true
Set objShell = Nothing
'use application error Description if bug and report
If (Err.number <> 0) Then
MsgBox "Error creating WMI object. Error: " & Err.Number & " - " & Err.Description
'clear error
Err.Clear
End If

:)

Attachment wordpad.zip not found

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

3 years 6 months ago - 3 years 6 months ago #15 by Stern
Replied by Stern on topic In-game camera position display.
Anything to report ?
Anything to fix ?

I will add some features to it so I can repair some bugs.

***
Enemy will have changeable "Look" direction.
Its a bit complicated because the Roll / Pitch / Yaw
angles are saved as Quaternion (4 numbers).

This is what you see in DCED:


That's how its saved:


Maybe its wise to add Angle <> Quaternion conversion.
I dont know if its usable maybe for model editing ???

But there is a online calculator for that:
http://andre-gaschler.com/rotationconverter/

If you put 90,0,0 into Euler Angle section (select Degrees as Input/Output format), then you see: 0.7071, 0, 0, 0.7071

This 0.707 should be familiar to anyone who has made AC calculations in electronics, its a -3dBV, (1/sqrt2)

The one who hesitates is lost !
Attachments:
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

3 years 4 months ago #16 by Stern
Replied by Stern on topic In-game camera position display.
Made some small changes.
Added Hotkey for Camera control.

I havnt been able to find memory addresses that hold the players "look" direction angle (something like 0->360 deg)
So this camera movement doesnt follow where cursor is pointed.

This program should work on Linux without problems, but i cannot confirm that.

HD2_PPD2 (TACO)

The one who hesitates is lost !
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

3 years 4 months ago - 3 years 4 months ago #17 by Stern
Replied by Stern on topic In-game camera position display.
Small update:

+Added spectator mode.

Now you can change your in-game camera move direction with computer mouse.
Usable only when no weapon in hand.
Turn it ON / OFF with keypad shortcut.
User can set step size (slow or fast move)
There is no collision restriction, you can move it anywhere in this 3D world.
(This feature is still not for public use, its password protected)

***
Thinking if this would be useful for Mafia ?
I dont know how many people make mods for Mafia,
Maybe this spectator mode and teleport function is useful.

The one who hesitates is lost !
The following user(s) said Thank You: snowman, Matro

Please Log in or Create an account to join the conversation.

3 years 4 months ago #18 by snowman
Replied by snowman on topic In-game camera position display.
Thank you, Stern :heart:

So this means that anyone interested in making a film on any map/ mission can get his "Director" chair once he has a written script? :dancing:

"Straight and narrow is the path."

Please Log in or Create an account to join the conversation.

  • Lukasz birthday is in 9 days (41)
Powered by Kunena Forum