How do I delete words?

Get help using Construct 2

Post » Mon Jan 30, 2017 1:12 pm

@gameglaux

how do i make something like that:
when i type ' beans' i will receive *****
but when i type 'bucket' i receive something other like '#@$@$'
but when i type' tree' for example i receive '()'

So
each word is other condition and do other action
but still system should change one word in whole sentence

can you help?
B
24
S
7
Posts: 208
Reputation: 2,032

Post » Mon Jan 30, 2017 7:16 pm

@IGDev if you want a specific string to replace a specific word you could use a dictionary to store and check against the words you want to replace.

Do you really want specific strings returned? Or just a random string of characters at any length? It seems a little odd to me to replace 'tree' with '()'... ;)
Image
B
29
S
9
G
3
Posts: 170
Reputation: 3,297

Post » Mon Jan 30, 2017 8:20 pm

gameglaux wrote:@IGDev if you want a specific string to replace a specific word you could use a dictionary to store and check against the words you want to replace.

Do you really want specific strings returned? Or just a random string of characters at any length? It seems a little odd to me to replace 'tree' with '()'... ;)


Well im not familiar with functions and dictionaires (and arrays too) this is black magic for me.

Its just a simple example when i type 'tree' events change tre to '()' or 'wood' or something else ;)

"Do you really want specific strings returned?"
yes
because when system find needed word like tree or beans, for each word action should do something else in event sheet
thats why i put in post few examples
Previously all words you change to **** now i want decide what happened when textbox find that word

my english is not clean prabably you see that ;)
B
24
S
7
Posts: 208
Reputation: 2,032

Post » Mon Jan 30, 2017 10:07 pm

@IGDev Ok, if you want your app to do something when a word is found in a sentence? It doesnt make sense to convert that word to something else first.

So if 'tree' is found in the sentence, you can do something if it finds the word 'tree'. You dont have to make it '()' then do something on '()'. Are you using 'tree' or 'beans' as examples of swear words? Do you want to notify the user of the app that they have entered swear words?

If you explain as best you can what you want to do when words are found, I might be able to help more :)
Image
B
29
S
9
G
3
Posts: 170
Reputation: 3,297

Post » Mon Jan 30, 2017 10:49 pm

@gameglaux he means if system find word 'tree' this text word are changed to "()"
but after" and before " you can type anything in event sheet
'()' its example like '**' when you cover bad word

confusing i must say
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Tue Jan 31, 2017 9:41 am

@gameglaux

Yeas lets forget about '()'

i need to have posibility like in your previous example

i type in local variable 'banned words 'my own words

but in this case i need posibility to decide what action typed word do next
B
24
S
7
Posts: 208
Reputation: 2,032

Post » Tue Jan 31, 2017 10:11 am

@IGDev Try this: https://drive.google.com/file/d/0B56h97 ... sp=sharing

Checks a string for specific words. When it finds one it executes a specific function for that word.
Image
B
29
S
9
G
3
Posts: 170
Reputation: 3,297

Post » Tue Jan 31, 2017 12:24 pm

gameglaux wrote:@IGDev Try this: https://drive.google.com/file/d/0B56h97 ... sp=sharing

Checks a string for specific words. When it finds one it executes a specific function for that word.



ok!
so first thing
all typed characters should be displayed on output text
when function is called 'fn-tree'
output text should change this word to something else for example lets change to "TREE" in this function


something like that
https://www.dropbox.com/s/yysfg5jblcfjm ... 5.png?dl=0
B
24
S
7
Posts: 208
Reputation: 2,032

Post » Tue Jan 31, 2017 2:28 pm

Image
B
29
S
9
G
3
Posts: 170
Reputation: 3,297

Post » Tue Jan 31, 2017 5:18 pm




ok next image please take look to move forward

https://www.dropbox.com/s/h0kacsc4cjnn2 ... 4.png?dl=0
B
24
S
7
Posts: 208
Reputation: 2,032

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: zsoldiers and 6 guests