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
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 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
WTH sniper function in the docs #131045
05/22/07 05:24
05/22/07 05:24
Joined: Aug 2004
Posts: 137
F
foodstamp Offline OP
Member
foodstamp  Offline OP
Member
F

Joined: Aug 2004
Posts: 137
OK honestly I am not a rocket scientist but wth is with all the stuff in the docs on coding. Yes I am grateful it gives examples but where do I put the examples at. Do I always make a new wdl or what.

Right from the manual does not say if you need to add to the main script or add anew script with the code in it. Sorry if I sound a little angry but I am.

Quote:

Angle that gives the horizontal field of view. It's default value of 60 degrees corresponds to the human eye. By decreasing this angle you'll get a telescope effect. If the arc of a view has a negative value, the view is horizontally flipped. This way rear view mirrors can be realized.
Range
-180 .. 180 (default: 60)

Type:
var
Example:
function sniper()
{
while(1)
{
if(mouse_right) // right mouse button pressed
{
camera.arc = max(camera.arc - time, 30); // reduce fiel of view
}
else
{
camera.arc = min(camera.arc + time, 60); // increase fiel of view
}
wait(1);
}
}





Re: WTH sniper function in the docs [Re: foodstamp] #131046
05/22/07 05:27
05/22/07 05:27
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
well you can make a seperate wdl and collect all functions that
belong to that.Like for all weapons realted code you can create weapons.wdl
and for enemy realted codes enemy.wdl and so on.No need to make a seperate
wdl for each code.
cheers


I like good 'views' because they have no 'strings' attached..
Re: WTH sniper function in the docs [Re: zazang] #131047
05/22/07 15:55
05/22/07 15:55
Joined: Aug 2004
Posts: 137
F
foodstamp Offline OP
Member
foodstamp  Offline OP
Member
F

Joined: Aug 2004
Posts: 137
ermmm yeah ok thanks for that info. Looks like me and scripting will not get along

Re: WTH sniper function in the docs [Re: foodstamp] #131048
05/22/07 22:58
05/22/07 22:58
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
The example is a good one as a stand alone function (not included in another function like 'Wepons or Player and so on..)
Just add it to your main after the 'Main", place "function sniper();" above your main to give the engine the source to look for and call it with its 'if' staement in mind.

on_mouse_right function sniper();

Dont be angry at not being able to make things work right off, game dev is a long agonizing experience for every body and 'learning while doing' seems to be the most common learning style but not the only one, using the manual and scripting guides (all on the download page) is another.

So, just be cool and post each successive prob in a nice way to get more responses, we are not the support arm of conitec, we are all learners like you and we have all been down the same road over and over again.
You should of seen some of my early posts

Last edited by Nems; 05/22/07 23:00.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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