Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error expected method or property
Mudbill Offline

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
RE: Error expected method or property

The explanation below each of them should tell you roughly what it does. For example the first one:

PHP Code: (Select All)
float RandFloat(float afMinfloat afMax); 

This function will return a random value between the specified minimum and maximum values. The data type will be a float. If you know C++, you know what a float is.

Let's say you have this:

PHP Code: (Select All)
float f1 1.0f;

float f2 RandFloat(0.0f4.0f);

f2 f1) {
//execute script.

This example effectively returns a 20% chance of the if-statement being accepted. f1 is valued at 1, and f2 has a completely random value between 0 and 4 (inclusive). If f2 turns out to become 0, then the if-statement passes because f2 is less than f1. If f2 turns out to randomly become either 1, 2, 3 or 4, then it does not pass.

That's just one example of course. I can't explain all those in detail, but they are used in combination with other scripts on the page.

You should focus on the more action-like ones to get used to how they work. The ones like PlaySoundAtEntity or AddEntityCollideCallback or SetEntityActive should be interesting to check out.

If there's something you don't know what does, you can either try it or just not use it. There's nothing forcing you into using every script listed.

(This post was last modified: 02-04-2015, 05:04 PM by Mudbill.)
02-04-2015, 05:02 PM

Messages In This Thread
Error expected method or property - by Icaab2608 - 01-31-2015, 08:34 PM
RE: Error expected method or property - by Mudbill - 02-04-2015, 05:02 PM

Users browsing this thread: 1 Guest(s)