Product Chat / Picking things up

Author
Message
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 4th Aug 2015 03:41
Outside of the normal pickups, how do I make it so other things can be collected (picked up). Example: A player is sent on a quest to pick up 10 spoons 5 herbs and 7 rocks, then return to the quest giver for a reward.
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 4th Aug 2015 06:06 Edited at: 4th Aug 2015 06:54
You will need to learn LUA scripting. For picking up objects, you need something like this in your script:


PlayerDist = GetPlayerDistance(e)
if PlayerDist < 60 then
Collected(e);
Destroy(e);
end

This is an example only, there are GG scripts under C:\Program Files <(x86)>\Steam\steamapps\common\Game Guru\Files\scriptbank.
Check out the Health.lua and the RPG community video found at https://www.game-guru.com/tutorials/1030. Also I recommend doing a search on the forums e.g. Quest or RPG.
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 4th Aug 2015 08:19
Thank you.
A c i d
9
Years of Service
User Offline
Joined: 16th Apr 2015
Location: Russia
Posted: 6th Aug 2015 08:52 Edited at: 6th Aug 2015 08:53
FabledFoe,

Especially for such cases I wrote Quest System.


You can use only the "collect" quests (without the "kill" and "destroy" quests) and choose a reward: money or/and weapons.

You can get it here: https://en.tgcstore.net/product/24068
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 6th Aug 2015 18:10 Edited at: 6th Aug 2015 18:20
Acid, that is very cool, and I have been eyeing that up in the store. In the future I will definitely need a system like yours. As you can imagine, I have no knowledge of scripting. I'm still afraid of screwing something up by changing a script. I don't even know how to change and save a script without messing up the original.

I'm going through all the Twitch videos now trying to learn how to do things like this and I'm on information overload, almost 150 hours in the last week in Game Guru and the videos alone, not including Blender, assets or any of that.. Don't get me wrong, it will sink in in a short amount of time.

There are a lot of things I have planned for the games I want to make that aren't supported yet. So a lot of things like your system will have to wait until other things are added to the software, like fishing, crafting, etc.

What I've figured out what I need right now is, a collection script that can be added to any entity. And that's it.--For the moment.

Example: If I want the player to clean up all the explosive barrels, or garbage, or catch all the birds, all I'd have to do is add the collection script to the entity through the properties. (This is temporary until, I get more adept at making games).

What I have been trying, is laying down an entity such as a barrel, and loading a health.lua or key.lua to it. But that doesn't work so well, because as you know, when you pick up a barrel of acid with a health.lua it gives you health and tells you it gave you health, and with the key, it tells the player they have picked up a key displaying the text.

All I want it to do at the moment is to collect the entity and it just disappear with no text.

I saw in the Twitch videos where I could do that myself, but like I said, I'm afraid I'm gonna screw something up, and it's taking me a long time to get with it. Is there an entity that can be picked up that doesn't do or say anything other than disappear?
A c i d
9
Years of Service
User Offline
Joined: 16th Apr 2015
Location: Russia
Posted: 6th Aug 2015 19:38
FabledFoe,
check your PM
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 6th Aug 2015 19:50
Thanks for the help.
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 7th Aug 2015 00:07
I picked up those packs, gonna be in my hidey hole for awhile. Probably a long while. Thanks Acid.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 8th Aug 2015 04:29
Making a fetching script is a great intro into LUA, I must say.
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 12th Aug 2015 03:41
I've been playing around with changing scripts a little more. Pretty cool stuff.
"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 12th Aug 2015 04:52
Yes, scripting will give you more control over every aspect of your game in time.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 12th Aug 2015 19:32
If I could just figure out how to do fishing, farming and racing I'll be on my way to the finish line.

I figured out a couple forms of fishing, but not the whole fishing pole thing. I need animations for that, and a fishing pole. And someway to record the players catch.

A pre-rigged racing track would be awesome. One where we could edit the track layout. Like if I wanted a Daytona Track , or a Sebring track or Gator Nationals Drag racing track, or the old Moroso. With a qualify round, start race, end race, timed lap, and winner. That would be awesome. With the quest system, I could charge for entry to the race, and players could buy things from the NPCs, maybe vehicles, maybe something to hang in their in-game home.

That's the direction I'm heading. But it's a whole lot more than that. MMO, a very important one.

"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><
FabledFoe
9
Years of Service
User Offline
Joined: 26th Jul 2015
Playing: Game Guru
Posted: 12th Aug 2015 20:06
I just found some fishing scripts, but I have no clue how to use them with GameGuru.
"Don't give up on your dreams, or your dreams will give up on you."- SS <*})))><

Login to post a reply

Server time is: 2024-11-25 09:32:15
Your offset time is: 2024-11-25 09:32:15