Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,466 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Cheat code #320966
04/26/10 09:20
04/26/10 09:20
Joined: Apr 2010
Posts: 4
V
Vidar Offline OP
Guest
Vidar  Offline OP
Guest
V

Joined: Apr 2010
Posts: 4
Hello.

I'm making a small shooting game and i want to make a cheat code. If i press the key w i want to get more ammo.

I dont know what to write and where to put it in the code. This is what i have tried.

void cheat()
{
if (key_w == ON)
{
my.ammo_pickup()
}

}

\\ammo.pickup() is a function in weapons.wdl

I have puted this in the main wdl file. The one with the same name as the game.

I'm using Gamestudio 6.60 PRO and run Windows 7. For scripting im using Script Editor 6.51.2.

Thanks in Advance -Vidar

Re: Cheat code [Re: Vidar] #321112
04/27/10 08:13
04/27/10 08:13
Joined: Apr 2010
Posts: 4
V
Vidar Offline OP
Guest
Vidar  Offline OP
Guest
V

Joined: Apr 2010
Posts: 4
No help out there?

-Vidar

Re: Cheat code [Re: Vidar] #321140
04/27/10 10:49
04/27/10 10:49
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Why you write my.ammo_pickup()? There have not to be my. in front of the Functioncall.
And set all in a while(1) loop.

Last edited by Widi; 04/27/10 10:49.
Re: Cheat code [Re: Widi] #321142
04/27/10 10:55
04/27/10 10:55
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
if you are using A6 then you cant uns lite-c because lite-c is only supported by A7


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Cheat code [Re: Vidar] #334502
07/23/10 18:11
07/23/10 18:11
Joined: Jul 2009
Posts: 80
Area 51
F
fangedscorpion Offline
Junior Member
fangedscorpion  Offline
Junior Member
F

Joined: Jul 2009
Posts: 80
Area 51
try attaching the ammo_pickup() to a key

in your main you would put on_w = ammo_pickup;

this assigns the w key the function of "ammo_pickup"

if you need to call a function you wrote off this, you could type

function give_ammo()//or whatever name you want
{
my.ammo_pickup();
}

then assign the w key to it in your main

on_w = give_ammo


"Pow! You are dead! Not big suprise!" -Heavy

Moderated by  HeelX, rvL_eXile 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1