Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Terrible At Variables: Needing Some Insight

Author
Message
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 21st Aug 2012 07:41
Alright, I'm about ready to release an under-wraps project but I'm getting the final touches in and adding in some variable scripts. I cannot post my work here as it would ruin the surprise for everyone. However, I will try to explain my situation:

I have a marker that declares variables at the start of the game. Example- ":state=0:dimvar=hasitem1,dimvar=hasitem2" etc, etc

I have several items scattered through the map, each one has a certain line in the script. Example- "setvar=hasitem1"

THEN, the last item you need to click on takes a calculation of how many items you have or if you do not have an item. If you don't have 1 of the items needed, it defaults to another state. If you have the items needed... the player is given an item instantly.

My problem is that I feel I haven't set it up right. If anyone would be kind enough to drop me a message here and leave me your email, I will send the script pack to you.

If you can do it right... I KNOW I can learn more about variables as I see what you do to the script.

THANKS!

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 21st Aug 2012 10:35 Edited at: 21st Aug 2012 10:36
I am not very used to variables too but afair picking up these items needs a line like SETVAR=placeholder,ADDVAR=placeholder 1 to add up to a count.

And you can send me the script of course

In case you find my grammar and spelling weird ---> native German speaker ^^
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 21st Aug 2012 15:13 Edited at: 21st Aug 2012 15:14
hihi, second post in 2 days where i can give this link:

http://forum.thegamecreators.com/?m=forum_view&t=192901&b=21

basic collection system done for beno. should help to understand the very basics. take a look into "conjured entertainment´s cash system" is best.

gz

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 21st Aug 2012 15:24
And don`t forget that you have global and local variables. Passing variables from a script attached to dynamic entities to another requires most of the time global ones.

Come to where the madness is:http://www.homegrowngames.at
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 21st Aug 2012 20:11
I emailed you StoryTeller.

@ Everyone else-

Thanks for trying to help. I have a marker that (attempts) to set the global variables and I have the items add 1 to the count. However, I'm still not getting it right. Maybe StoryTeller can help.

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Aug 2012 20:36
With the variable system in place since v1.18 (the system that uses dimvar, etc), I would think using it rather than global/local variable method would be easier and require less scripting. That's just my observation.


Twitter: @NFoxMedia
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 22nd Aug 2012 00:03
Idk. I'm using dimvar... I've looked at some made scripts but I'm still lost as to what I'm actually doing or not doing.

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 22nd Aug 2012 01:13
Quote: " I'm using dimvar... I've looked at some made scripts but I'm still lost as to what I'm actually doing or not doing."


In the General Script Information thread, I outlined the usage of global variables and using dimvar. If you have not done so, you may wish to review it. The post outlines the usage quite clearly.


Twitter: @NFoxMedia
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 22nd Aug 2012 06:21
Yeah... my head still hurts trying to think about it.

PC Specs: AMD X4 2.7Ghz, 8GB DDR3 RAM, Nvidia 9800GT, Win. 7 Pro 64 Bit
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 22nd Aug 2012 10:24 Edited at: 22nd Aug 2012 10:24
your task doesnt sound to complicated. so for understanding: you want to collect different items and when collected all of them, you want to give the player another (virtual) winner-item, right?
whats easy to do is spawn an item in a defined place. i dont think there is a workable way to spawn a real entity near the player for the winner-item, so a itemhud/varset with onscreen-message would do it? both would be just a little edit in the upper posted system.

if you want to, send it to me, i will have a look into it.

Login to post a reply

Server time is: 2024-11-23 22:55:32
Your offset time is: 2024-11-23 22:55:32