Scripts / Pause function in script ?

Author
Message
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 29th Apr 2020 15:50 Edited at: 29th Apr 2020 15:52
HI all.
I was wandering would it be possibly for Lee or some script Guru to write us a lua function that we can add in global lua
so that we can have a Pause in the script something like: Pause(3000) or what every could work , it would be so much easier if there was something like that, instead of always having to use timers or counters like ::
function StartTimer(e)
g_Entity[e]['timer'] = g_Time
end
it would save a lot of time if we could actually have something like that.
Anyone feels the same.?
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Apr 2020 17:43
Your script is executed *every* frame.

If you want the script to do nothing for a period of time then you will have to code that in the script, like this:
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Apr 2020 17:58
on a similar subject the ability to manipulate the time of the game would be really cool - AKA bullet time - i.e. slows down the game for everything apart from the player (think super hot or max payne)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Apr 2020 18:32
Add it to GitHub as a suggestion, I'd love to see Lee's response!
Been there, done that, got all the T-Shirts!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 29th Apr 2020 18:52 Edited at: 29th Apr 2020 18:55
@PCS
Please post script questions to the Scripts category
Moved to Scripts.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 29th Apr 2020 19:29
synchromesh, hmm yes sorry.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 29th Apr 2020 19:31
@AmenMoses, will put request in at GitHub
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Apr 2020 20:28
I was joking!
Been there, done that, got all the T-Shirts!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 29th Apr 2020 20:38


source
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Apr 2020 20:58
I don't think he wants to have GG grind to a complete halt!
Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 29th Apr 2020 21:20 Edited at: 29th Apr 2020 21:21
Quote: "I was joking! "

Ok, also good because i don't know my way so nicely around GitHub.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 29th Apr 2020 21:44
Super Hot is an interesting concept. A relatively simple
SlowObject(e,p,t) -- I could see that being used- some time!
Add another timer- and triggers basically Amen's script...
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Apr 2020 22:43
Quote: "Super Hot is an interesting concept. A relatively simple
SlowObject(e,p,t) -- I could see that being used- some time!
Add another timer- and triggers basically Amen's script..."

it requires engine code to be more realistic as you would want the physics to also slow down (rag doll, explosions etc) otherwise yes you could fake it by slowing down animations and such
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Apr 2020 00:42
You cant' just 'slow down' animations and movement globally though, you would have to change every single script for every entity in the game, in addition to engine changes to somehow 'slow down' physics (which isn't really feasible in itself because there isn't a 'slow down' setting in Bullet anyhow, the closest you could get would be to set the default gravity to a very low value and the default damping to extremely high and even then that probably wouldn't be very realistic or predictable).

One thing that would definitely ruin the effect is that the AI would still fire their weapons at the same speed and as there aren't really any 'bullets' in the default weapons system so you still wouldn't be able to see them or dodge them.

So to recap: Engine changes to 'slow down' physics, a huge amount of scripting to allow movement and animation speed to be 'slowed down' and somehow replace the entire weapons system with one using physical 'bullets' and 'real' melee weapons.

I think Lee would ROTFLHAO!

Oh and of course I haven't even considered particle effects, lighting and sound!
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 30th Apr 2020 03:29
Sounds quite elaborate indeed!
So anyhow guys, how are things going out there? Considering the world -wide
issues we've been facing -- Are some things getting in any sense of the word,
"back to normal" as we would like to see? Hope so for everyone.
Keep up the good work- and stay safe!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Apr 2020 11:06
So there's no StepPhysics() like function in GG's core (which is in AGK and that also uses bullet so yes it is possible to slow it down)? That's a shame but yes, if the engine is not designed with full control of its own update in mind then it won't work easily.
It's a fun feature to play with though for sure, I use it all the time in my projects
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Apr 2020 16:52
If there are functions in AGK that would be nice to have in GG then by all means add a request for them on GitHub.
Been there, done that, got all the T-Shirts!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 30th Apr 2020 17:24
Quote: "I don't think he wants to have GG grind to a complete halt!"

Oh! I don't know what I was thinking. LOL
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 30th Apr 2020 18:31
it is so nice to have people around here that knows a lot more than me. thanks
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Login to post a reply

Server time is: 2024-04-23 10:16:04
Your offset time is: 2024-04-23 10:16:04