Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Ammo/health change from level trigger

Chat and ask questions about Water Gun Wars here!
Post Reply
mad.scientist
Member
Member
Posts: 7
Joined: November 13th, 2013, 7:58 am

Ammo/health change from level trigger

Post by mad.scientist »

Hi,
I have been trying to find a way of adding ammo and health changes using a level trigger in fps mode. The idea is to allow my younger students to collect coins and use them to buy health/ammo (renamed magic) from the mapname.cfg file. The reason for this is to keep the scripting to a single .cfg file for them.
I don't want to use the ammo pickups as the kids tend to just dump them onto the map without a thought to gameplay goals.
I have tried a variety of different methods which seemed intuitive to me but without success.

I don't suppose anyone knows if it is possible and if so what the syntax is?

Regards
John
User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Ammo/health change from level trigger

Post by Wind Astella »

So if I recall correctly, you wanted to implement a buy/sell system in fps mode. I think it is only possible in the RPG module though. It is possible if and only if the newent script can be trigger during game and not only in editmode but it don't. So I think it is impossible unless you mod the engine and compile a new.
You should refer to the Cube 2 reference for the full script.

Sorry if I wasn't helping.
mad.scientist
Member
Member
Posts: 7
Joined: November 13th, 2013, 7:58 am

Re: Ammo/health change from level trigger

Post by mad.scientist »

Thanks for that,
All ideas are good ideas, I'm just trying to avoid reinventing the wheel if the capability is there in fps .

Perhaps I do need to look at making a change in the source to add the function. The question is the best place to create a function that can be called in the config script.

It's not quite a buy an sell system. Rather I need to change ammo and health from the mapname.cfg file, 8 year olds often have issues with the multiple file system of rpg.

something like this..... (I know it's not right but it gives a basic idea of what I'm trying to achieve.)

level_trigger_3 = [ ammo[GUN_PISTOL] = 40; health = 30 ]

regards
John
User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Ammo/health change from level trigger

Post by Wind Astella »

Here a small information I can give you, COMMAND and ICOMMAND functions are use to create a new script function. I am away from my computer right now so I can't remember what parameter you need to specify.
The variable for health and ammo, you can search it in the fps.h header file. It was declared there.

Hope you can achieve your goal.
mad.scientist
Member
Member
Posts: 7
Joined: November 13th, 2013, 7:58 am

Re: Ammo/health change from level trigger

Post by mad.scientist »

That's great stuff Wind, I will have a look into ICOMMAND and see what I can play with. I'm not a great C programmer but I should be able to make it work.
Many thanks.
John
User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Ammo/health change from level trigger

Post by Wind Astella »

Your welcome mad.scientist. Good luck teaching the children.
mad.scientist
Member
Member
Posts: 7
Joined: November 13th, 2013, 7:58 am

Re: Ammo/health change from level trigger

Post by mad.scientist »

the solution is here:


viewtopic.php?f=15&t=4428
User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Ammo/health change from level trigger

Post by Wind Astella »

Great work mad.scientist. How is the children doing?
mad.scientist
Member
Member
Posts: 7
Joined: November 13th, 2013, 7:58 am

Re: Ammo/health change from level trigger

Post by mad.scientist »

I'm just writing the next workshop at the moment. I have one student who, despite a massive IQ needs everything written step by step. Will post a link to Mage edition sandbox when I have finished modifying it.
User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: Ammo/health change from level trigger

Post by Wind Astella »

I like your dedication. Keep up with it.

I think the forum need to have custom version section for modded version of engine.
Post Reply