Scripts / Button Question for AmenMoses

Author
Message
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 26th Dec 2017 17:39
HI AmenMosses, just a quick question regarding the button script you gave us for the buttons Bod has made.
In the first video , that button script that you supplied gave an error when i use it on the buttons, shown in the pictured attach.

i also tested the second button script that you supplied in the second video , hoping it might work , that script does not do anything when i attach it to the buttons.
can you please check for me, or am i doing something wrong.

ps... i have only tested the button script just with the buttons, not with any extra functions or scripts, just to check the animation of the buttons.

Thank you.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 27th Dec 2017 15:54
"Put the finger.png file in the scriptbank/images folder.

Just attach the script to all the buttons you use and make sure the button entities all have different names."

Did you follow those instructions?
Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 17:14
Quote: "Did you follow those instructions?"


hmm the finger.png,,, must have missed that one while i was looking at the instructions of ......... look at picture.

looks like i read the wrong instructions. hehehe sorry AmenMoses

Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 27th Dec 2017 20:25
Btw, try this helicopter.lua script, I only did a little tweak but it seems to work ok for me.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 20:40
Thanks , will try it now.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 21:38
thank you its flying perfect.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 22:24
AmenMoses, one more question please.
If i use the helicopter_landing.lua script, and i put the script on a drum or what ever, and lets say i want to put it on a platform or maybe bods hellipad. then the helicopter does land , but not on the same height as that the entity that has the landing script on it , it land directly under the entity and not on the platform or helli pad. can you please advice me were to modify the script if possible. thank you very much.


in the picture i have attach the landing script on the drum, and was hoping the helicopter would land on the same height as the drum, or plus minus .
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 27th Dec 2017 22:31 Edited at: 27th Dec 2017 22:36
Well it is supposed to land on the platform! Does it land and then fall through the platform?

Try this one.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 22:34 Edited at: 27th Dec 2017 22:36
no it fly's strait to the point directly under the barrel, it just land thru it, . you can see that its control landing up to were it sits on the ground.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 22:37
ok will try it
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 27th Dec 2017 22:49 Edited at: 27th Dec 2017 23:04
it just stops right on top of the barrel but to high up. ( still flying)





its 01:00 in the morning this side. have to get some sleep. will be back a couple of hours later after i have got some sleep and when will be at work.

thanks for all your help , i cant say thank you enough.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Dec 2017 10:07
Another couple of fixes.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 28th Dec 2017 13:34
Thanks, i am still at work. Will only be at the house after 3 hours. Then i wil test it.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 28th Dec 2017 13:42
Would be nice if every ones time stamp is also displayed under there names. Then i can see what time it is of the user im talking to. Have mention this to Lee, he said he would look into it.



Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 28th Dec 2017 16:57
AmenMoses, i wish i have just 10 percent of you lua scripting tallent.
I thank you , you are truly gifted. the chopper land perfect on the hellipad.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 28th Dec 2017 20:21
Amenmoses the script work very nice. if i use the friendly mode then the helicopter starts up and land were the landing script is, but when i want to use the neutral script it fly's continuously as the script was made for. here is my question if i use the neutral mode how can i tel it to land after lets sy 3min.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB 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: 28th Dec 2017 20:27
I'm not on my main PC so can't check but I'm pretty sure somewhere (probably at the top of the script) there is a variable to change the flight time, or maybe it's passed in by the call script. I'll take a look next time I'm on my dev machine.
Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 28th Dec 2017 20:29
thank you. so far i can only let it land with the friendly mode not the neutral mode.

Thanks
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB 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: 28th Dec 2017 22:28
Setting fltTime to the number of seconds you want should do it.

In 'enemy' or 'friendly' mode the helicopter will land either to reload or if there are no more targets to attack.

These are all the parameters you can set in the call helicopter function:
CallHelicopters(Num, Mode, fltTime, retToOrig, Height, Strength)

Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 29th Dec 2017 18:35 Edited at: 29th Dec 2017 19:16
AmenMoses, ok i have made another plan to stop it from landing. i have put a flag in to the script , i have a separate script that makes the land_triger 0 or 1 , and then it land.
Thank you for all your help.

Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB 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 Dec 2017 19:35
You can use true and false you know, i.e.

landTrigger = true
or
landTrigger = false
...

if landTrigger then plane.state = 'land1' end

Will work just as well.

Although you have me a little puzzled as I thought you couldnt get it to land using the fltTime parameter (which works fine as I tested it earlier today) but now you seen to be adding a flag to stop it from landing.


Been there, done that, got all the T-Shirts!
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 29th Dec 2017 19:56
lol, to be honest i still dont know were to add the time, i was to embarrassed to ask again, but i have learned a little how to add some stuf like flags. ( from my son ) i would stil be so thank full if you could just show me with code snippets were to add the time.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB 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 Dec 2017 20:36 Edited at: 29th Dec 2017 20:37
The script that calls the helicopters simply calls CallHelicopters(Num, Mode, fltTime, retToOrig, Height, Strength)

Num - is the number of helicopters
Mode - is the mode you want them to have enemy/friendly/neutral
fltTime - how long in seconds they should fly around for
retToOrig - true if they should land back at the point they took off from
Height - height above terrain they should fly
Strength - how hard it is to kill them

So the script I tried earlier did this:

CallHelicopters(4, 'friendly', 400)
CallHelicopters(1, 'neutral', 30)

So this basically calls 4 friendly helicopters with flight time of 400 seconds each (or they land when no targets left) and 1 neutral helicopter with a flight time of 30 seconds, basically takes off and almost immediately lands again.

As long as you have enough entities available in the map to create all the helicopters you call for then you can make as many calls to CallHelicopters as you like.

Remember to allow enough time for the helicopters to set themselves up before calling CallHelicopters, about 10 seconds should do it, once they have finished their mission they should return to 'idle' state and then you can call them again.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2024-03-28 11:23:02
Your offset time is: 2024-03-28 11:23:02