Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 5 1 2 3 4 5
Re: i've done everything i can think of [Re: gamingfan101] #276268
07/04/09 04:38
07/04/09 04:38
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
you've got 2 main() functions! you cannot have 2 main() functions otherwise the second overrides the first!

I have another solution for you though. you should publish both your scripts separately, then put them both in the same folder. One of the scripts should have an externel .exe execute function (exec(STRING* program, STRING* options)) inside that runs the other one. same in the other script.
Hope this helps..

Re: i've done everything i can think of [Re: the_mehmaster] #276298
07/04/09 09:48
07/04/09 09:48
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
there's no point in having 2 programs for this,
Originally Posted By: gamingfan101
ok, im really am sorry, i can tell im beginning to get annoying
and you're not being annoying laugh

you need to create unique functions for what you're trying to do
so in your credits functions you still have all the definitions you need, but youu just need to set which TEXT and PANEL visible depending on what you're doing

so you can put all your PANELs and TEXT in a seperate scripts like you have, then have a function that toggles what you need

so on buttonclick of creditbutton3 have toggle show_credits()

then
Code:
function show_credits() set(opening_txt, SHOW);

etc... hope this helps

Re: i've done everything i can think of [Re: MrGuest] #276302
07/04/09 11:07
07/04/09 11:07
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Quote:
there's no point in having 2 programs for this

I realise that, and that's not how i would do it.
It's just that that's the simplest method using what he already has.

In fact, the method i actually use is more like yours.

Re: i've done everything i can think of [Re: the_mehmaster] #276360
07/04/09 18:52
07/04/09 18:52
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, i've got the functions and all, but i cant test them because everytime i use the #include "credits.c" they combine the two scripts and none of the buttons will work. I think its because of something missing in my main function. Here it is below, what else should go into it? These arent levels so level_load will not work.

function main()
{
video_mode = 7;
mouse_map = my_cursor;
mouse_mode = 4;
media_loop("mainmusic.wav",NULL,100);
}

thanks again


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #276416
07/04/09 23:28
07/04/09 23:28
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

This is good reading wink

All your code is panels and text.
Put everything under one title and one main
then play with "show"
If you touch this button then show this...."function"..
The function would hold the name of the panel and set show...it would
also set the other panels to no---show


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: i've done everything i can think of [Re: Ottawa] #276427
07/05/09 00:16
07/05/09 00:16
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
and in your original code, remove the SHOW flags from items you don't want do 'show' on startup

Re: i've done everything i can think of [Re: MrGuest] #276438
07/05/09 01:37
07/05/09 01:37
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, thank you so much, i've got this part working now. Once again thank you so much for your patience.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #276440
07/05/09 01:45
07/05/09 01:45
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, one more question, when i stop my music that i have playing bt media_play. What would i use to stop it? media_stop doesnt work.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #276447
07/05/09 04:48
07/05/09 04:48
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
media_stop should work fine, just make sure you have a handle to the sound that you are playing...

Code:
var handle;
handle = media_loop("music.mp3",null,50);
...
media_stop(handle);



Re: i've done everything i can think of [Re: Ottawa] #276455
07/05/09 06:02
07/05/09 06:02
Joined: Sep 2005
Posts: 508
Texas
not_me Offline
User
not_me  Offline
User

Joined: Sep 2005
Posts: 508
Texas
Originally Posted By: Ottawa
Hi!

By writing in your code the name of the function
my_robot_function ();
which is in your "robotshowcase.c"

I think that the include should be at the top of your main.c file
under all the other includes
and not in a function.
You where in fact trying to call the actions of your entity with the include
That's not the way to do it. You have to call the name of the function wink



I always thought that if you defined an #include in a function that it becomes a local function. and #includes defined outside of functions are global...but i think i may be wrong...if im right..then he would just define the #include before the action hes calling. that way it has its file to call from...thats my thinking though.


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Page 4 of 5 1 2 3 4 5

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

Gamestudio download | chip programmers | 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