Scripts / Hitting an object multiple times =

Author
Message
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 17th Jun 2019 23:09 Edited at: 17th Jun 2019 23:11
Hi all, working with a tree fell script at the moment if I hit the tree once it falls over using ( if g_PlayerGunFired == 1 then ….next part of the script ) how would I script it to hit 6 times before it goes to the next part I tried the use of * but im unsure if that's multiply or a wildcard maybe :/
Cheers
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Jun 2019 23:15 Edited at: 17th Jun 2019 23:23
Show me the money! I mean the script, had a Cruise moment there for a second.

Basically you have to count the hits and when you get to the number you want, trigger the behaviour you want.

Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 17th Jun 2019 23:54 Edited at: 17th Jun 2019 23:57
Script is a modified Dvader paid scripts m8 so don't know whether he wants it on here but will give you a chunk so you can see what I'm on about, I've changed it from a keypress so the player can use the axe to chop it down but it only takes one hit wheras I would prefer to have say 6 hits.

Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Jun 2019 01:54
Something like:

Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 18th Jun 2019 14:20
Hmm I totally see how that should work, but still fell down on 1 hit lol everything else in the script just refers to how it grows the angle it grows at and when to collect it so now I'm really confused lol
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Jun 2019 20:12
Probably because it's counting up to 6 so quickly you can't see it, probably need to debounce the g_PlayerGunFired bit.
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 18th Jun 2019 20:25 Edited at: 18th Jun 2019 20:58
De bounce the gunfire oooo no you have lost me lol but I do have my new projects menu working … yay well very close to being finished, just need to smelt the ores and cook meals
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Jun 2019 20:57 Edited at: 18th Jun 2019 20:58
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 18th Jun 2019 22:41 Edited at: 18th Jun 2019 22:42
Hahaha perfect thanks m8 appreciated ! That's going to save me losing hair nearly finished the menu although it's going to need some glitzing up methinks but its mostly there and working added cooking and smelting for higher level crafting items bullets for flintlocks etc

Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Attachments

Login to view attachments
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 19th Jun 2019 19:32
Rely cool Honkeyboy, looks great

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 19th Jun 2019 22:26
Wow, really great work!
How did you get that text size?! It looks (if you use GG Text) to be
somewhere between size 3 and 2. But both those sizes are pretty
useless I thought. 3 is pretty big (but doable), while 2 is t-t tiny.
I need something half way between! Swell job there!
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 19th Jun 2019 23:59
The text size numbers aren't linear, ie they don't go from 1 small to 4 big, they're actually each one a different font/size and not in specific order, i think there's actually 9 of them in total.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 20th Jun 2019 15:49 Edited at: 20th Jun 2019 15:49
I didn't actually use any text sizing in this menu tbh I just spaced it out to fit, AM did the sizing on the last survival menu I did as there was a lot more in it. Just trying to keep it at a minimum atm so as when I come to writing the save and load files there wont be days worth to write out. but as with the other scripts when its all finished and working I'll post it all up so you guys can dissect/edit it for your own projects
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 3rd Jul 2019 01:23
Hi Belidos. Thanks for the useful info.

Well, I wonder if there might be a way to manually add new fonts?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Jul 2019 20:10
https://forum.game-guru.com/thread/220055#msg2605634 look for the Sprite based fonts library and follow the link.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-12-22 14:03:39
Your offset time is: 2024-12-22 14:03:39