Graal Forums  

Go Back   Graal Forums > Search Forums
FAQ Members List Calendar Today's Posts

Showing results 276 to 300 of 499
Search took 0.01 seconds; generated 83 minute(s) ago.
Search: Posts Made By: Tolnaftate2004
Forum: NPC Scripting 11-30-2007, 06:39 AM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
Where were you in this thread then?! :P No...

Where were you in this thread then?! :P
No offense, Hell Raven...
Forum: NPC Scripting 11-30-2007, 12:13 AM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
It's good practice.

It's good practice.
Forum: NPC Scripting 11-30-2007, 12:04 AM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
That's not really the point of the thread. We're...

That's not really the point of the thread. We're trying to solve problems as efficiently as possible, which is a skill that will come in handy.
Forum: NPC Scripting 11-29-2007, 11:08 PM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
Okay, so why the temp.intersect array now? We can...

Okay, so why the temp.intersect array now? We can just do:

for(e: smallerarray)
if(temp.b.("v"@e))
temp.c.("v"@e) = true;

temp.intersect = temp.c.getdynamicvarnames();


I...
Forum: NPC Scripting 11-29-2007, 10:37 PM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
Also, the method you proposed for determining the...

Also, the method you proposed for determining the intersection gives duplicates.
Forum: NPC Scripting 11-29-2007, 08:53 AM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
The maximum size of the intersect should be the...

The maximum size of the intersect should be the size of the small array as it cannot possibly have more elements in common than there are in the set.
Forum: NPC Scripting 11-29-2007, 05:38 AM
Replies: 9
Views: 3,171
Posted By Tolnaftate2004
int, please. e: it says int...

int, please.
e: it says int...
Forum: Code Gallery 11-29-2007, 05:31 AM
Replies: 5
Views: 2,395
Posted By Tolnaftate2004
<<b>Avoided!<</b> Also, "spam"? span,...

<<b>Avoided!<</b>

Also, "spam"? span, perhaps.
e: What is "hl"?
Forum: NPC Scripting 11-29-2007, 12:37 AM
Replies: 13
Views: 2,702
Posted By Tolnaftate2004
Classes in GScript are probably more closely...

Classes in GScript are probably more closely related to header files in C++ (or object files, even); join is somewhat like #include (or your linker).
Forum: NPC Scripting 11-27-2007, 11:48 AM
Replies: 22
Views: 4,065
Posted By Tolnaftate2004
function bucketfill(fx,fy,ft) { // fill x,...

function bucketfill(fx,fy,ft) {
// fill x, fill y, fill tile
temp.rt = tiles[fx,fy];
tiles[fx,fy] = ft;
updateboard(fx,fy,1,1);
for (temp.i=0; temp.i<4; temp.i++) {
temp.tx =...
Forum: NPC Scripting 11-21-2007, 06:30 AM
Replies: 26
Views: 4,743
Posted By Tolnaftate2004
Can you make a variable with name "var="? I think...

Can you make a variable with name "var="? I think that's what he's getting at.
Forum: Videos 11-21-2007, 06:18 AM
Replies: 33
Views: 28,836
Posted By Tolnaftate2004
Fixed

Fixed
Forum: NPC Scripting 11-21-2007, 02:53 AM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
Not quite. :P e: nice ninja edit.

Not quite. :P
e: nice ninja edit.
Forum: NPC Scripting 11-20-2007, 10:42 PM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
A good point: O(N1*N2 + N!/((N-3)!*3!)) I...

A good point: O(N1*N2 + N!/((N-3)!*3!))

I had originally intended to do something along these lines:
for (elmt: temp.c[0]) {
if (elmt in temp.c[1])
temp.intersect.add(elmt);
}...
Forum: NPC Scripting 11-20-2007, 08:05 AM
Replies: 51
Views: 49,278
Posted By Tolnaftate2004
function S3(arrA,arrB) { ...

function S3(arrA,arrB) {
temp.intersect.clear();
temp.sets.clear();
if (arrA.size() > arrB.size()) temp.c = {arrB,arrA};
else temp.c = {arrA,arrB};

for...
Forum: NPC Scripting 11-08-2007, 06:14 AM
Replies: 27
Views: 3,659
Posted By Tolnaftate2004
? separates the condition from two statements...

? separates the condition from two statements that could be made:
condition?statements;


: separates the two statements apart from one another:
statement1:statement2


All they do is tell...
Forum: NPC Scripting 11-08-2007, 04:46 AM
Replies: 27
Views: 3,659
Posted By Tolnaftate2004
An if statement is certainly less useful in...

An if statement is certainly less useful in situations such as:
echo(temp.amount @ " apple" @ ((temp.amount != 1)?"s":"");
Forum: NPC Scripting 11-08-2007, 04:06 AM
Replies: 27
Views: 3,659
Posted By Tolnaftate2004
It evaluates a condition and depending on whether...

It evaluates a condition and depending on whether it is true or false, it will execute the true-case or the false-case.

I say 'execute', but in practice, using this as flow-control is bad.
Forum: NPC Scripting 11-08-2007, 03:31 AM
Replies: 27
Views: 3,659
Posted By Tolnaftate2004
for (needle: haystack) { // "needle" now...

for (needle: haystack) {
// "needle" now points to the address of a value in "haystack"
statements;
}
Known as a for-each statement.

condition?true-case:false-case
Known as the tertiary...
Forum: NPC Scripting 11-03-2007, 09:53 PM
Replies: 21
Views: 3,371
Posted By Tolnaftate2004
This is probably why it's not functioning like...

This is probably why it's not functioning like you'd want it to. sin() and cos() already split an angle into y- and x-components. So, you only need a single angle.

Here is an example:...
Forum: NPC Scripting 10-31-2007, 11:33 PM
Replies: 8
Views: 1,823
Posted By Tolnaftate2004
It seems that var.index() only accepts strings as...

It seems that var.index() only accepts strings as its parameter, so it's no bug.

Inverness: I don't think you caught what was being pointed out... :confused:
Forum: NPC Scripting 10-31-2007, 08:57 AM
Replies: 21
Views: 3,371
Posted By Tolnaftate2004
That's probably an issue with the position of the...

That's probably an issue with the position of the onwall checks. You need to check from the center of the object outwards, or you'll have it hitting walls about 1 tile too soon when headed up/left,...
Forum: NPC Scripting 10-31-2007, 06:28 AM
Replies: 21
Views: 3,371
Posted By Tolnaftate2004
You only need one angle...

You only need one angle...
Forum: NPC Scripting 10-31-2007, 12:23 AM
Replies: 21
Views: 3,371
Posted By Tolnaftate2004
move_dist*cos(angle) is the x component; ...

move_dist*cos(angle) is the x component;
move_dist*sin(angle) is the y component (might need to be negative since (0,0) is the UPPER left corner on a level).
Forum: NPC Scripting 10-29-2007, 03:15 AM
Replies: 21
Views: 3,371
Posted By Tolnaftate2004
Strange. You should perhaps split up the movement...

Strange. You should perhaps split up the movement into vertical and horizontal components and check them individually to see if it's a horizontal or vertical wall.
Showing results 276 to 300 of 499

 
Forum Jump

All times are GMT +2. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.