Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - revvin

Pages: 1 [2] 3
16
Technical forum / LOOP Operators?
« on: February 09, 2005, 11:33:41 AM »
I noticed in a script mnemonic supplied me he used "||" as an operator. I am guessing this is an "OR" equivalent?
Does anybody have any links to information on the types of Operators used in this script?  I am used to the old AND OR NOTs... but cant seem to get them to work?

I am trying to achieve:

    WHILE (Actor.X > StartX) AND (Actor.X < EndX) DO
        {
            code to execute
        }

Thanks again,
Kev

17
Technical forum / Re: how can i make a stair?
« on: February 07, 2005, 01:02:47 PM »
I knew I didnt understand the question. lol.   :-[

Sorry tinchopunk

18
Technical forum / Re: Actor in region?
« on: February 07, 2005, 01:01:34 PM »
Yes... that sounds like a good solution for portability purposes. I'll have a play with that code and see what I come up with.

Thanks again,

19
Technical forum / Re: how can i make a stair?
« on: February 07, 2005, 12:29:06 PM »
Not 100% certain I understand the question... but assuming you want to make your character walk up stairs... maybe you could create a new sprite animation of your character climbing the stairs.

Then - once the player clicks that region - make the Actor go to that spot, then change the animation to your character climbing the steps, then change the scene.

Does that help?

20
Technical forum / Actor in region?
« on: February 07, 2005, 12:26:25 PM »
I need a Boolean expresion that contains True or False depending on whether an Actor is within a region.

What I need to achieve is to remove the "while (actor.X > StartX)" and replace with "while (actor.InRegion)" - or something similar...

In an ideal world - i'd also like the X coord extremities from the region variablised (thats not really a word is it?  ;) ) too - that way I dont need to specify the StartX and EndX variables at the top of the code - and thus making this little snippet of code completely portable throughout the rest of the project.

Any ideas?

Code: [Select]
#include "scripts\base.inc"

var StartX = 320;      // Furthest left X coord of Region
var EndX = 640;       //  Furthest right X coord of Region
var MaxScale = -50;   //  The maximum complimentary scale to add to the standard scene scale

on "ActorEntry"   // When Actor Enters Region
{
  while (actor.X > StartX)   // Rudimentary "if In region" code...
  {
    actor.RelativeScale = (MaxScale /100) * ( (100 / (EndX - StartX)) * (actor.X - StartX) );  // Calculates the percentage to add to the current scale
    Sleep(10);  // Return control back to the engine
  }
}

on "ActorLeave"  // When Actor Leaves Region
{
  actor.RelativeScale = 0;  // Set Scaling back to default so as not to disrupt the normal scaling of the scene
}

Many thanks,
Kev


21
Technical forum / Re: more lights
« on: January 28, 2005, 01:48:36 AM »
Hi,
You'll find that the script language used in WME is very similar in structure to a number of high-level languages. You would probably benefit by teaching yourself some of the basics of scripting. If you are already versed in basic scripting - sorry...  :-[

But if you are not... then this should help:

I found this after a brief search on google - http://www.phys.ualberta.ca/~tluchko/academic/2004/420/fortran_basics/fortran_basics.html
Its for "Fortran" but looks as though it explains the basics of FOR, IF, WHILE loops quite nicely and should help you learn WME more easily.

http://www.modula2.org/tutor/chapter1.php
This also looks like it could be a useful Tutorial. I havent had a proper read - but they look like a similar structure.

Failing that - maybe find a book on scripting ?

I am definitely no wizard - but I learnt Turbo Pascal at college a few years back - and the fundamentals are very similar... and I am picking up this WME very quickly

Hope that helps... ?

22
Technical forum / Re: Horizontal Scaling?
« on: January 27, 2005, 05:01:02 PM »
Maybe you need a more aggressive scale?

Hmm... I cant really scale him any more agressively - he is tiny. There doesnt seem to be any difference in speed at all? Maybe its because we are manually adjusting the scale?
Is it possible to control the walk speed in the script? I cant seem to find any variables for it?

23
Technical forum / Re: DEFAULT ANIMATIONS WITH DIFFERENT SOUND EFFECTS
« on: January 27, 2005, 12:34:36 AM »
but dont forget the "Sleep(200)" to tie it in with the animation...  ;D

24
Technical forum / Re: DEFAULT ANIMATIONS WITH DIFFERENT SOUND EFFECTS
« on: January 26, 2005, 12:46:49 PM »
bugger... close enough...  ;)

25
General Discussion / Re: #600 - The unofficial introduce-yourself thread
« on: January 26, 2005, 12:16:51 PM »
Hi guys!
Thought I should introduce myself  8)

My name is Kevin Brown. I am 28yrs old from Kent in the UK and work as an I.T. Technician for a Bank.

Its hard to list my favourite three adventures... and definitely cant put them in any kind of order... so my favourites are:

Monkey Island 1,2 and 3. (Didnt like EMI - just cant get my head around 3D Adventures... also why I dont like Grim Fandango)
Indiana Jones and the Last Crusade
Indiana Jones and the Fate Of Atlantis
Leisure Suit Larry 1,2,3 and 5. (My favourite is actually number 3)
Hero Quest 1 & 2 (The original text-parser version)
Space Quest - the whole series.
Day Of The Tentacle
Sam & Max Hit The Road
The Dig
Rex Nebular and the Cosmic Gender Bender (little known Microprose title...)
Operation Stealth (Delphine Software)
Cruise For A Corpse
Police Quest 1 & 2 (original versions)

lmao... actually theres probably more - but I think you get the idea where I am coming from.  ;D

Oh... and I am working on a game called "Marooned". Originally using the Visionaire engine... but have been tempted by the delights of WME...

Teaser Trailer

Main Website

Laters

26
Technical forum / Re: DEFAULT ANIMATIONS WITH DIFFERENT SOUND EFFECTS
« on: January 26, 2005, 11:34:37 AM »
In your script when you take an item - just play the sound?

Code: [Select]
//add item to inventory
Game.TakeItem("bottle");
Sleep(200); //this pauses before playing the sound. You should be able to time it to play at the correct frame.
PlaySound("/data/scenes/scene1/sounds/bottle.wav")

Does that help?

27
Technical forum / Re: Horizontal Scaling?
« on: January 26, 2005, 01:07:48 AM »
IT WORKED!!! EUREKA!!!  ::rock

I have put the amended script above. The character seems a little jumpy - almost as if its resetting the scale every other frame? Maybe somebody could check the script?

The reason I want the scaling for both X & Y should be fairly clearly demonstrated on the image... once our character reaches the second half of the scene - the perspective shifts. So as he walks towards the RIGHT (X+) he needs to reduce in size... but also when he moves UP/DOWN (Y+-) because he may explore the beach.



Hopefully this script (or an optimised version?) could come in handy to other WME Users?

Next stop... Making him walk slower when smaller....

28
Technical forum / Re: Horizontal Scaling?
« on: January 25, 2005, 03:12:18 PM »
see above. (doh!)

29
Technical forum / Re: Horizontal Scaling?
« on: January 24, 2005, 11:12:08 AM »
Ok guys... need a bit of help... I *think* I may have cracked the problem... but need some input from the professionals. :D

I cant run WME at work to test my theory... but does the following look like it will work?

Code: [Select]
#include "scripts\base.inc"

var StartX = 1000; //The left edge of the region where the custom scaling starts
var EndX = 1700;   //The furthest right edge of the custom scaling region
var StartY = 370;  //The top of the custom Y (Vertical) Scaling
var EndY = 558;    //The bottom of the custom Y (Vertical) Scaling

var StartScale = 40;
var EndScale = 15;

var VertDiff = 30; //The percentage difference the Vert scale will add to the custom scale

while(true)
{
  // normal scale if actor is outside the script-controlled area
  if(actor.X < StartX || actor.X > EndX) actor.Scale = null;

  // otherwise set the scale manually depending on X position
  else
  {
    // Calculate the scale based on the Horizontal Position
    actor.Scale = StartScale + (EndScale - StartScale) * ((actor.X - StartX) / (EndX - StartX));

    // Now calculate the percentage to add to the scale based on the Vertical position and ADD
    // it to the previously calculated scale.
    actor.Scale = actor.Scale + ((VertDiff / (EndY-StartY)) * (actor.Y - StartY));
  }

  // and go to sleep for some time
  Sleep(100);
}

 ???

Thanks,
Rev

30
Technical forum / Re: Horizontal Scaling?
« on: January 24, 2005, 10:56:40 AM »
Hmm... works perfectly!  But...  it doesnt quite look right.

It needs to work "in addition" to the scene scaling...

In the scene... the Beach extends off to the right - but into the distance. So as the character walks right he gets smaller (which works) - HOWEVER, because we disable the scene scaling - if the actor walks up/down - he doesnt scale at all... which means he cant explore the scene... we'd have to restrict movement to left/right only...

Is it possible to have the HorizScale +/- ADDED to the Normal Scene scaling? Or maybe work the HorizScale as a percentage?

Ie - if the current Actor.Scale=50(%) and the HorizScale is 50% - Actor.Scale becomes 25%.  As the Scene scale goes between 40%-60% - the HorizScale would make it range between 20%-60%.

Does that make sense?

I'll have to sit and play with the script and try to learn how to do this sort of thing myself... I can see me using a lot of custom scripts. :o)

I am loving WME by the way.

Pages: 1 [2] 3

Page created in 0.129 seconds with 24 queries.