just wondering if i was able to scale an object while it was moving?
e.g, a ball rolls away from me (my point of view) i want the ball to move up as well as scale down (into the distance).
What's the best way to go about doing this?
Thanks
You can use the character representing a ball. Draw a walk-able area, set continuous scaling and make the character move upwards.
-Cheers
Yeh i had actually thought of that, didnt have the balls to try it untill someone confirmed :D cheers
1 more prob :(
EnableInterface(2);
NEVER works, i repeat NEVER, always gives me parameter errors when i try to run the script. heres the script anyhow.
// room script file
function room_a() {
// script for room: Player enters screen (after fadein)
EnableInterface(2);
GUIOn(2);
SetObjectView(0,5);
AnimateObject(0,0,19,1);
}
function hotspot1_a() {
// script for hotspot1: Look at hotspot
GiveScore(1);
}
OK i've made a new character... it contains one frame of one loop, which is indeed a ball sprite. I've also set it to load in the particular room i want and it appears... though obviously stays still.
now what? :P sorry so very novice at this point... perhaps u could post an example of how my script should look.
greatly appreciated
QuoteEnableInterface(2);
NEVER works, i repeat NEVER, always gives me parameter errors when i try to run the script. heres the script anyhow.
Because it does take no parameters at all:
EnableInterface ()Re-enables the player interface, which was previously disabled with the DisableInterface function. Everything which was disabled is returned to normal.
Just EnableInterface(). Looking at you script I guess you thought that it enables GUI#2 for the player to control. No, if you disable interface all GUIs become inactive. There was a misunderstanding in terminology. While the whole interface is an ability for the player to control the game, the GUIs are windows with buttons, labels, textboxes etc... Just a user menues in other words.
QuoteOK i've made a new character... it contains one frame of one loop, which is indeed a ball sprite. I've also set it to load in the particular room i want and it appears... though obviously stays still.
now what?
Now goto the room editor and draw a walk-able area as I already said then set it's scaling parameters.
Next goto character panel, place a ball character just under that walkable. You have to enter appropriate co-ordinates (use mouse pos label in the room editor to find out what co-ordinates you need to set)
Next open script editor and write MoveCharacter() command. Using
Player enters screen iteraction for example:
function room_*() {
// script for room: Player enters screen (after fadein)
MoveCharacterDirect(BALL, character[BALL].x, character[BALL].y - 40);
}
-Cheers
taa, really appreciate that :P
nah, in my last room i had to disable both the GUI 'and' the interface.
i can enable the GUI again in the new room but not the interface, anyway im quite sure it's due to my many simptoms of being a retard and what not.
thanks again :)
Oh, completely forget about interface problem:
I already encountered similar problem... a month ago
if you disable interface three times (for example) you need to enable it three times as well:
DisableInterface();
DisableInterface();
DisableInterface();
EnableInterface();
interface is STILL disabled!
DisableInterface();
DisableInterface();
DisableInterface();
EnableInterface();
EnableInterface();
EnableInterface();
and the above script works fine. Interface becomes enabled.
Some my suggestion before disabling interface check if it's realy enabled:
Just replace each line: DisableInterface();
With: if (IsInterfaceEnabled()==1) DisableInterface();
not sure if it's a bug or it is the mechanism by means it should work (remember disabling level :P)
-Cheers
NICE ONE! :D :D
how'd u stumble across that fix?? lol
trial and error i suppose :P
very much appreciated :D
Quotehow'd you stumble across that fix?? lol
well, I had a script where the interface was being disabled inside the repeatedly_execute():
function repeatedly_execute() {
if (.......) DisplableInterface();
}
or something similar... then on some event I was enabling it again but the game didn't respond so I was going to check out it this way:
DisplableInterface();
DisplableInterface();
EnableInterface();
As far as I figured out what's wrong I changed the script adding if (IsInterfaceEnabled()==1) condition statement.
so that is ;)
-Cheers
I'll make this clear in the manual for the next version.
It's deliberate by the way - so that if you have a custom function you can have it like:
function do_stuff () {
DisableInterface();
// do some stuff
EnableInterface();
}
to ensure that the interface is disabled - but if it was already disabled beforehand, the function won't accidentally re-enable it.
No worries, thanks again :)
Aha, so it really keeps of the interface disabling level. Thanks for confirmation CJ.
-Cheers
What about if you enable interface multiple times... do you have to then disable them multiple times too to get rid of it ? :)
hehe, nope as there is no reason to have the ability to enable it multiple times :)
-Cheers